-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
get_column
acting weird before unicode symbols.
#312
Labels
Comments
banacorn
added a commit
to tree-sitter/tree-sitter-agda
that referenced
this issue
Mar 27, 2019
`get_column` is acting weird before unicode symbols. tree-sitter/tree-sitter#312 Instead we maintain the column number by ourselves.
Wow that's not good. If you get a chance, could you provide a minimal example grammar and scanner that reproduces the problem? |
Here's an example repo (on brnach To run the example: git clone git@github.com:tree-sitter/tree-sitter-agda.git
cd tree-sitter-agda
git checkout tree-sitter#312
npm install
npx tree-sitter generate
npx tree-sitter test And you should see some numbers printed from the scanner
Here's the testing corpus:
I'm not sure how to make this example better, but I think you can see the problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose that
lexer->get_column(lexer)
returns with some valuen
after advancing the character"a"
.After skipping one whitespace with
lexer->advance(lexer, true)
and stops before some unicode symbol"ε"
,lexer->get_column(lexer)
should returnn + 1
.However, what I got was
n - 1
.The text was updated successfully, but these errors were encountered: