Open artificial-smahon opened 1 year ago
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.
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
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, '...', '*', '(', '[', '+', '-', '~', '{'}