summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorXie Yanbo <xieyanbo@gmail.com>2024-07-23 09:04:14 (GMT)
committerGitHub <noreply@github.com>2024-07-23 09:04:14 (GMT)
commit2a5d1eb7073179a13159bce937afdbe240432e7d (patch)
tree114a47805f9b80b1d7f003997a4e6b50f3d09088 /Parser
parent47847aa8ef66837f984fc4e30187d88f8d8ab201 (diff)
downloadcpython-2a5d1eb7073179a13159bce937afdbe240432e7d.zip
cpython-2a5d1eb7073179a13159bce937afdbe240432e7d.tar.gz
cpython-2a5d1eb7073179a13159bce937afdbe240432e7d.tar.bz2
Fix typos in comments and exception message (#122147)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/action_helpers.c2
-rwxr-xr-xParser/asdl_c.py2
-rw-r--r--Parser/pegen_errors.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/Parser/action_helpers.c b/Parser/action_helpers.c
index 0307a08..db6f872 100644
--- a/Parser/action_helpers.c
+++ b/Parser/action_helpers.c
@@ -1594,7 +1594,7 @@ _PyPegen_concatenate_strings(Parser *p, asdl_expr_seq *strings,
for (i = 0; i < n_flattened_elements; i++) {
expr_ty elem = asdl_seq_GET(flattened, i);
- /* The concatenation of a FormattedValue and an empty Contant should
+ /* The concatenation of a FormattedValue and an empty Constant should
lead to the FormattedValue itself. Thus, we will not take any empty
constants into account, just as in `_PyPegen_joined_str` */
if (f_string_found && elem->kind == Constant_kind &&
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index e6867f1..9fed69b 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -131,7 +131,7 @@ class EmitVisitor(asdl.VisitorBase):
def metadata(self):
if self._metadata is None:
raise ValueError(
- "%s was expecting to be annnotated with metadata"
+ "%s was expecting to be annotated with metadata"
% type(self).__name__
)
return self._metadata
diff --git a/Parser/pegen_errors.c b/Parser/pegen_errors.c
index e8f11a6..e94a492 100644
--- a/Parser/pegen_errors.c
+++ b/Parser/pegen_errors.c
@@ -155,7 +155,7 @@ _Pypegen_raise_decode_error(Parser *p)
static int
_PyPegen_tokenize_full_source_to_check_for_errors(Parser *p) {
// Tokenize the whole input to see if there are any tokenization
- // errors such as mistmatching parentheses. These will get priority
+ // errors such as mismatching parentheses. These will get priority
// over generic syntax errors only if the line number of the error is
// before the one that we had for the generic error.