Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 27610:1d8c86234d9c 2.2
backport:
revision 2.75
date: 2003/01/29 14:20:22; author: mwh; state: Exp; lines: +2 -0
Teach the parsermodule about floor division. Fixes
[ 676521 ] parser module validation failure
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 02 Feb 2003 19:34:14 +0000 |
| parents | 91dd223829c6 |
| children | 1dc6366543d4 |
line wrap: on
line diff
--- a/Modules/parsermodule.c Sun Feb 02 19:26:25 2003 +0000 +++ b/Modules/parsermodule.c Sun Feb 02 19:34:14 2003 +0000 @@ -1438,6 +1438,7 @@ || strcmp(s, "-=") == 0 || strcmp(s, "*=") == 0 || strcmp(s, "/=") == 0 + || strcmp(s, "//=") == 0 || strcmp(s, "%=") == 0 || strcmp(s, "&=") == 0 || strcmp(s, "|=") == 0 @@ -2093,6 +2094,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)));
