Skip to content

Ignore references in C literals and comments - #798

Merged
ydah merged 1 commit into
masterfrom
fix/user-code-reference-scanning
Oct 19, 2026
Merged

ydah merged 1 commit into
masterfrom
fix/user-code-reference-scanning

Conversation

@ydah

@ydah ydah commented Sep 4, 2026

Copy link
Copy Markdown
Member

UserCode#references treated $n and @n inside C string literals and // comments as grammar references. As a result, generated C silently rewrote text that Bison preserves. Only /* */ comments were previously skipped.

Skip string and character literals while honoring escaped quotes, and skip both line and block comments. References outside those regions continue to be detected normally.

@ydah
ydah force-pushed the fix/user-code-reference-scanning branch from 1d057f1 to 9896068 Compare September 4, 2026 12:55
@ydah
ydah merged commit f606350 into master Oct 19, 2026
45 checks passed
@ydah
ydah deleted the fix/user-code-reference-scanning branch October 19, 2026 05:16
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.

2 participants