Skip to content

Commit dc2facb

Browse files
committed
fixup! Add pgen module to the Parser folder to produce pgen output using pgen2
1 parent e2ed0d1 commit dc2facb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Parser/pgen/token.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def generate_opmap(tokens):
3131
continue
3232

3333
name, op = pieces
34-
3534
yield (op.strip("'"), name)
3635

36+
# Yield independently <>. This is needed so it does not collide
37+
# with the token generation in "generate_tokens" because if this
38+
# symbol is included in Grammar/Tokens, it will collide with !=
39+
# as it has the same name (NOTEQUAL).
3740
yield ('<>', 'NOTEQUAL')

0 commit comments

Comments
 (0)