Skip to content

fix(semantic-tokens): use Token.Offset for regex pattern length calculation#92

Merged
acme merged 2 commits intomainfrom
acme/long-string-semantic-fix
Jan 30, 2026
Merged

fix(semantic-tokens): use Token.Offset for regex pattern length calculation#92
acme merged 2 commits intomainfrom
acme/long-string-semantic-fix

Conversation

@acme
Copy link
Collaborator

@acme acme commented Jan 30, 2026

  • Fix long strings ({"..."}) being incorrectly tokenized in regex contexts
  • Previously hardcoded +2 for quote delimiters; now uses Token.Offset from falco AST (2 for regular strings, 4 for long strings)
  • Add test case for heredoc-style long string in regex pattern

acme added 2 commits January 30, 2026 13:20
…lation

- Fix long strings (`{"..."}`) being incorrectly tokenized in regex contexts
- Previously hardcoded `+2` for quote delimiters; now uses `Token.Offset` from
  falco AST (2 for regular strings, 4 for long strings)
- Add test case for heredoc-style long string in regex pattern
@acme acme merged commit 6e1dad7 into main Jan 30, 2026
5 of 6 checks passed
@acme acme deleted the acme/long-string-semantic-fix branch January 30, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments