Skip to content

Commit d021d42

Browse files
committed
Add docs for super nodes
1 parent 74ab72b commit d021d42

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,14 @@ nodes:
26312631
26322632
super
26332633
^^^^^
2634+
2635+
A `ForwardingSuperNode` can still have a block.
2636+
All other arguments are forwarded as normal, except the original block is replaced with the new block.
2637+
2638+
super { 123 }
2639+
^^^^^^^^^^^^^
2640+
2641+
If it has any other arguments, it would be a `SuperNode` instead.
26342642
- name: GlobalVariableAndWriteNode
26352643
fields:
26362644
- name: name
@@ -4506,6 +4514,7 @@ nodes:
45064514
- name: arguments
45074515
type: node?
45084516
kind: ArgumentsNode
4517+
comment: "Can be `nil` when there are empty parentheses, like `super()`."
45094518
- name: rparen_loc
45104519
type: location?
45114520
- name: block

0 commit comments

Comments
 (0)