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
po formatter.tokens
▿ 3 elements
▿ 0 : Token
- number : "1"
▿ 1 : Token
- symbol : "..<"
▿ 2 : Token
- number : "5"
Which looks OK.
However, when adding a comment after the expression, then the tokenizer replaces .symbol("..<") with 2 tokens, a .symbol("..") and a .startOfScope("<"). Example:
By all means have a go at fixing it, or I'll tackle it myself this evening. Either way, a PR with a unit test to reproduce the issue would be much appreciated!
This code:
Results in this tokens:
Which looks OK.
However, when adding a comment after the expression, then the tokenizer replaces
.symbol("..<")
with 2 tokens, a.symbol("..")
and a.startOfScope("<")
. Example:Results in:
The start of scope is a very delicate token because it makes other searches break, as everything after the
<
is in a different scope now.The text was updated successfully, but these errors were encountered: