Skip to content

Commit 69abcdb

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

config.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2626,11 +2626,18 @@ nodes:
26262626
- name: block
26272627
type: node?
26282628
kind: BlockNode
2629+
comment: |
2630+
All other arguments are forwarded as normal, except the original block is replaced with the new block.
26292631
comment: |
2630-
Represents the use of the `super` keyword without parentheses or arguments.
2632+
Represents the use of the `super` keyword without parentheses or arguments, but which might have a block.
26312633
26322634
super
26332635
^^^^^
2636+
2637+
super { 123 }
2638+
^^^^^^^^^^^^^
2639+
2640+
If it has any other arguments, it would be a `SuperNode` instead.
26342641
- name: GlobalVariableAndWriteNode
26352642
fields:
26362643
- name: name
@@ -4506,6 +4513,7 @@ nodes:
45064513
- name: arguments
45074514
type: node?
45084515
kind: ArgumentsNode
4516+
comment: "Can be only `nil` when there are empty parentheses, like `super()`."
45094517
- name: rparen_loc
45104518
type: location?
45114519
- name: block
@@ -4521,6 +4529,8 @@ nodes:
45214529
45224530
super foo, bar
45234531
^^^^^^^^^^^^^^
4532+
4533+
If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead.
45244534
- name: SymbolNode
45254535
flags: SymbolFlags
45264536
fields:

0 commit comments

Comments
 (0)