Parsing python that uses the walrus operator is throwing errors. `if e := tc.get("exception"):` `line 78:18 extraneous input '=' expecting {STRING, NUMBER, 'return', 'raise', 'from', 'import', 'global', 'nonlocal', 'assert', 'lambda', 'not', 'None', 'True', 'False', 'yield', 'del', 'pass', 'continue', 'break', 'await', NEWLINE, NAME, '...', '*', '(', '[', '+', '-', '~', '{'}`
Activity
lexanth commentedon Jan 23, 2023
This package just wraps the grammar from https://github.com/antlr/grammars-v4/tree/master/python/python3-ts
That hasn't been updated to support newer syntax yet - once it has been, I'll update this package to support it.
RobEin commentedon Jul 31, 2023
I recommend these two parsers:
https://github.com/RobEin/ANTLR4-Python-grammar-by-PEG
https://github.com/RobEin/ANTLR4-parser-for-Python-3.8.12