Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2627,6 +2627,14 @@ nodes:
end
- name: ForwardingSuperNode
fields:
- name: keyword_loc
type: location
comment: |
super
^^^^^

super { 123 }
^^^^^
- name: block
type: node?
kind: BlockNode
Expand Down
4 changes: 2 additions & 2 deletions rbi/generated/prism/dsl.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 21 additions & 4 deletions rbi/generated/prism/node.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sig/generated/prism/dsl.rbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 34 additions & 4 deletions sig/generated/prism/node.rbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions snapshots/super.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
└── body: (length: 9)
├── @ ForwardingSuperNode (location: (1,0)-(1,5))
│ ├── flags: newline
│ ├── keyword_loc: (1,0)-(1,5) = "super"
│ └── block: ∅
├── @ SuperNode (location: (3,0)-(3,7))
│ ├── flags: newline
Expand Down Expand Up @@ -83,6 +84,7 @@
│ └── operator_loc: (11,6)-(11,7) = "&"
├── @ ForwardingSuperNode (location: (13,0)-(13,8))
│ ├── flags: newline
│ ├── keyword_loc: (13,0)-(13,5) = "super"
│ └── block:
│ @ BlockNode (location: (13,6)-(13,8))
│ ├── flags: ∅
Expand Down
2 changes: 2 additions & 0 deletions snapshots/unparser/corpus/literal/super.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
└── body: (length: 11)
├── @ ForwardingSuperNode (location: (1,0)-(1,5))
│ ├── flags: newline
│ ├── keyword_loc: (1,0)-(1,5) = "super"
│ └── block: ∅
├── @ SuperNode (location: (2,0)-(2,7))
│ ├── flags: newline
Expand Down Expand Up @@ -170,6 +171,7 @@
│ └── block: ∅
├── @ ForwardingSuperNode (location: (10,0)-(12,1))
│ ├── flags: newline
│ ├── keyword_loc: (10,0)-(10,5) = "super"
│ └── block:
│ @ BlockNode (location: (10,6)-(12,1))
│ ├── flags: ∅
Expand Down
1 change: 1 addition & 0 deletions snapshots/whitequark/super_block.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
└── body: (length: 2)
├── @ ForwardingSuperNode (location: (1,0)-(1,12))
│ ├── flags: newline
│ ├── keyword_loc: (1,0)-(1,5) = "super"
│ └── block:
│ @ BlockNode (location: (1,6)-(1,12))
│ ├── flags: ∅
Expand Down
1 change: 1 addition & 0 deletions snapshots/whitequark/zsuper.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
└── body: (length: 1)
└── @ ForwardingSuperNode (location: (1,0)-(1,5))
├── flags: newline
├── keyword_loc: (1,0)-(1,5) = "super"
└── block: ∅
1 change: 1 addition & 0 deletions src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -4379,6 +4379,7 @@ pm_forwarding_super_node_create(pm_parser_t *parser, const pm_token_t *token, pm
++parser->node_id,
0,
(block == NULL) ? PM_LOCATION_INIT_TOKEN(parser, token) : PM_LOCATION_INIT_TOKEN_NODE(parser, token, block),
PM_LOCATION_INIT_TOKEN(parser, token),
block
);
}
Expand Down