Commit 179b3c99
179b3c990587Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 1 file · ~1 modified
Description
Fix LINE: read start_line field not value in SourceLineNode
The Prism parser stores LINE as a SourceLineNode with the line number in "start_line", but codegen was reading the nonexistent "value" field and getting 0.
Co-Authored-By: Claude Sonnet 4.6 [email protected]
Details
- Commit
- 179b3c990587
- Parent
- c6ddf4aaa973
src/codegen.cmodifiedView file
@@ -7839,7 +7839,7 @@
78397839
return;78407840
}78417841
if (!strcmp(ty, "SourceLineNode")) {7842-
buf_printf(b, "%lld", (long long)nt_int(nt, id, "value", 0));7842+
buf_printf(b, "%lld", (long long)nt_int(nt, id, "start_line", 0));78437843
return;78447844
}78457845
if (!strcmp(ty, "RegularExpressionNode")) {