Native parser crash: Mix of spaces and tabs
Open
bug
parsing
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
The parser seems to crash on even the most trivial mixing of tabs and spaces:
```python
def foo(x):
with x:
pass
```
The indentation is: 1 tab and 1 space, followed by 2 tabs and 1 space
The error:
```pycon
>>> import libcst
>>> libcst.parse_module('''\
... def foo(x):
... with x:
... pass
... ''')
Traceback (most recent call last):
File "", line 1, in
File "/Users/tusharsadhwani/code/marvin-python/venv3/lib/python3.10/site-packages/libcst/_parser/entrypoints.py", line 109, in parse_module
result = _parse(
```
Contributor guide
Assessment
This issue has not been assessed yet.