diff options
| author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2025-08-10 21:30:41 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-08-11 22:25:47 +0900 |
| commit | 4775d1ffa8a34f0bca3f6124c98426d56eb8e1b6 (patch) | |
| tree | 10259069a2d93fbbe42c5a875594c5de02c31dcd /include/ruby/util.h | |
| parent | e0b72ad2f1f4836e3303596ecae1f62aa60b2d80 (diff) | |
Add NODE IN locations
Add locations to struct `RNode_IN`.
memo:
```bash
> ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,24))
+-- body: (length: 1)
+-- @ CaseMatchNode (location: (1,0)-(1,24))
+-- predicate:
| @ IntegerNode (location: (1,5)-(1,6))
| +-- IntegerBaseFlags: decimal
| +-- value: 1
+-- conditions: (length: 1)
| +-- @ InNode (location: (1,8)-(1,19))
| +-- pattern:
| | @ IntegerNode (location: (1,11)-(1,12))
| | +-- IntegerBaseFlags: decimal
| | +-- value: 2
| +-- statements:
| | @ StatementsNode (location: (1,18)-(1,19))
| | +-- body: (length: 1)
| | +-- @ IntegerNode (location: (1,18)-(1,19))
| | +-- IntegerBaseFlags: decimal
| | +-- value: 3
| +-- in_loc: (1,8)-(1,10) = "in"
| +-- then_loc: (1,13)-(1,17) = "then"
+-- else_clause: nil
+-- case_keyword_loc: (1,0)-(1,4) = "case"
+-- end_keyword_loc: (1,21)-(1,24) = "end"
```
Diffstat (limited to 'include/ruby/util.h')
0 files changed, 0 insertions, 0 deletions
