Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python - "Unexpected token" error on ellipsis #709

Open
DetachHead opened this issue Jan 21, 2024 · 1 comment
Open

python - "Unexpected token" error on ellipsis #709

DetachHead opened this issue Jan 21, 2024 · 1 comment

Comments

@DetachHead
Copy link

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:

  1. Go to the ast viewer site
  2. change language to python
  3. input an ellipsis (...)

Expected behavior
no error

Screenshots
image

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
        }
      }
    }
@Scipion
Copy link
Contributor

Scipion commented Jan 22, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants