You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[lexer] in token position counting end boundary should be excluded #456
If I understand the title right, if the boundary should be excluded, then 5 is correct, right? 6 would also include the boundary.
So, in that example, the 5th token is the a token. The first position where that token appears is the 5, and the last position where that token appears is the 5 too.
For let for example, the first position where it appears is 1, and the last one is 3.
Activity
Razican commentedon Jun 6, 2020
If I understand the title right, if the boundary should be excluded, then
5is correct, right?6would also include the boundary.So, in that example, the 5th token is the
atoken. The first position where that token appears is the5, and the last position where that token appears is the5too.For
letfor example, the first position where it appears is1, and the last one is3.croraf commentedon Jun 6, 2020
No. The right boundary should be excluded meaning that if the right boundary is 5, the character at position 5 is not part of the token.
So for
letyou will have boundaries 1 and 4, including characters at position 1, 2 and 3. Excluding the character at position 4.Razican commentedon Jun 6, 2020
So, then, for
a, boundaries should be5and6, with the6excluded, right?croraf commentedon Jun 6, 2020
Yes
Razican commentedon Jun 6, 2020
Sorry, then I don't understand the bug. The span is set correctly, from position 5 to position 5, right?
yovoslav commentedon Jun 13, 2020
I think the issue is that the end boundary should be exclusive, e.g. in the example
a's span is[5, 5], when it should be[5, 6).Lan2u commentedon Jun 17, 2020
This will be fixed as part of #486.