Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 27517:51abb5e86226 legacy-trunk
Teach the parsermodule about floor division. Fixes
[ 676521 ] parser module validation failure
bugfix candidate.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Wed, 29 Jan 2003 14:20:23 +0000 |
| parents | 784e7fdf8c52 |
| children | 82cbf1178e4f |
line wrap: on
line diff
--- a/Modules/parsermodule.c Wed Jan 29 10:41:18 2003 +0000 +++ b/Modules/parsermodule.c Wed Jan 29 14:20:23 2003 +0000 @@ -1440,6 +1440,7 @@ || strcmp(s, "-=") == 0 || strcmp(s, "*=") == 0 || strcmp(s, "/=") == 0 + || strcmp(s, "//=") == 0 || strcmp(s, "%=") == 0 || strcmp(s, "&=") == 0 || strcmp(s, "|=") == 0 @@ -2095,6 +2096,7 @@ for ( ; res && (pos < nch); pos += 2) res = (((TYPE(CHILD(tree, pos)) == STAR) || (TYPE(CHILD(tree, pos)) == SLASH) + || (TYPE(CHILD(tree, pos)) == DOUBLESLASH) || (TYPE(CHILD(tree, pos)) == PERCENT)) && validate_factor(CHILD(tree, pos + 1)));
