diff options
author | Michael W. Hudson <mwh@python.net> | 2003-01-29 14:20:23 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2003-01-29 14:20:23 (GMT) |
commit | 5e83b7a9cce3c619c98f929c8cd425058fc49139 (patch) | |
tree | 3a91a39963470c73b9b320ff25e8834c805cc6c4 /Modules/parsermodule.c | |
parent | 090da4b626fe7cd4d642cc5e6e03041d97d80ffd (diff) | |
download | cpython-5e83b7a9cce3c619c98f929c8cd425058fc49139.zip cpython-5e83b7a9cce3c619c98f929c8cd425058fc49139.tar.gz cpython-5e83b7a9cce3c619c98f929c8cd425058fc49139.tar.bz2 |
Teach the parsermodule about floor division. Fixes
[ 676521 ] parser module validation failure
bugfix candidate.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index e0c7431..fd03067 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1440,6 +1440,7 @@ validate_expr_stmt(node *tree) || 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 @@ validate_term(node *tree) 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))); |