python - "Unexpected token" error on ellipsis
DetachHead opened this issue · comments
Describe the bug
a "Unexpected token" error occurs on an ellipsis literal (...
), which is valid python syntax: see https://docs.python.org/3/library/constants.html#Ellipsis
To Reproduce
Steps to reproduce the behavior:
- Go to the ast viewer site
- change language to python
- input an ellipsis (
...
)
Expected behavior
no error
Browser (please complete the following information):
- OS: windows 10
- Browser firefox
- Version: 121.0
astexplorer settings:
- Selected parser: python
- Contents of the local storage key
explorerSettingsV1
(code can be removed if you don't want it to be public):{ "showTransformPanel": false, "parserSettings": {}, "parserPerCategory": {}, "workbench": { "parser": "python", "code": "...", "keyMap": "default", "transform": { "code": "", "transformer": null } } }
Parser used for python is filbert which is fairly old (8 years old) and it seems that syntax is not supported by filbert. We could try to integrate another python parser.
Just in a quick search I could find:
https://www.npmjs.com/package/dt-python-parser (Published 2 years ago)
https://www.npmjs.com/package/jspython-interpreter (Published 4 months ago)
https://www.npmjs.com/package/python-ast (Published 3 years ago)