Closed Eloitor closed 6 months ago
tree-sitter --version
tree-sitter 0.21.0
.1l or .1L is not valid in python2.
.1l
.1L
Test: https://github.com/tree-sitter/tree-sitter-python/blob/22d3f87bdafac2782e907330babe4af574f5d0b4/test/corpus/literals.txt#L63C1-L64
Source: https://github.com/tree-sitter/tree-sitter-python/blob/22d3f87bdafac2782e907330babe4af574f5d0b4/grammar.js#L1160
Solution: I think that changing that line to optional(/[jJ]/) is needed.
optional(/[jJ]/)
.1l in the test/corpus/literals.txt fails to parse.
Or maybe you could stop using Python 2.
It is not valid in python3 either...
It's valid in python2 but not for floats
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)tree-sitter 0.21.0
Describe the bug
.1l
or.1L
is not valid in python2.Test: https://github.com/tree-sitter/tree-sitter-python/blob/22d3f87bdafac2782e907330babe4af574f5d0b4/test/corpus/literals.txt#L63C1-L64
Source: https://github.com/tree-sitter/tree-sitter-python/blob/22d3f87bdafac2782e907330babe4af574f5d0b4/grammar.js#L1160
Solution: I think that changing that line to
optional(/[jJ]/)
is needed.Steps To Reproduce/Bad Parse Tree
.1l
Expected Behavior/Parse Tree
.1l
in the test/corpus/literals.txt fails to parse.Repro