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
feat: raw string literal support (backtick strings) #10
Implemented in c74cc2a. The scope says "ensure raw strings don't trigger false diagnostics" — diagnostics come from shelling out to grayc, so those were never affected. The real defect was in the symbol scanner.
Raw string contents were scanned as source. The scanner walked lines without tracking string state, so:
produced a phantom variable PHANTOM and a phantom struct Bogus. Worse, the unbalanced { inside the raw string desynced block scanning, so Bogus consumed the following lines as its body — corrupting every symbol declared below it in the file, not just the ones inside the string.
Fixed with an offset-preserving mask applied before matching: raw-string interiors are blanked to spaces, newlines kept, so line/column positions stay exact. The masker steps over line comments, block comments, regular strings, and char literals, so a backtick inside any of them cannot open a spurious raw string — a comment like // use `foo` no longer swallows the code beneath it. Hover still renders the true source line, not the masked one.
The above now scans as tmpl only. Highlighting needed no change: the grammar's raw_string rule is an opaque /[^]*/with no interpolation node, andhighlights.scmalready scopes it as@string`.
Activity
SchoolyB commentedon Aug 18, 2026
Implemented in c74cc2a. The scope says "ensure raw strings don't trigger false diagnostics" — diagnostics come from shelling out to
grayc, so those were never affected. The real defect was in the symbol scanner.Raw string contents were scanned as source. The scanner walked lines without tracking string state, so:
produced a phantom variable
PHANTOMand a phantom structBogus. Worse, the unbalanced{inside the raw string desynced block scanning, soBogusconsumed the following lines as its body — corrupting every symbol declared below it in the file, not just the ones inside the string.Fixed with an offset-preserving mask applied before matching: raw-string interiors are blanked to spaces, newlines kept, so line/column positions stay exact. The masker steps over line comments, block comments, regular strings, and char literals, so a backtick inside any of them cannot open a spurious raw string — a comment like
// use `foo`no longer swallows the code beneath it. Hover still renders the true source line, not the masked one.The above now scans as
tmplonly. Highlighting needed no change: the grammar'sraw_stringrule is an opaque/[^]*/with no interpolation node, andhighlights.scmalready scopes it as@string`.feat(lsp): ignore declarations inside raw string literals (#10)