fkling / fkling/astexplorer

python - "Unexpected token" error on ellipsis

Open
#709 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.5k
Forks
772
PR merge metrics
No merged PRs in 30d

Description

**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](https://github.com/fkling/astexplorer/assets/57028336/6bb7b937-460d-43cd-ad0f-482d50586e02)

**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):
```json
{
"showTransformPanel": false,
"parserSettings": {},
"parserPerCategory": {},
"workbench": {
"parser": "python",
"code": "...",
"keyMap": "default",
"transform": {
"code": "",
"transformer": null
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.