File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/main/java/org/truffleruby/parser Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 13
13
import java .util .List ;
14
14
15
15
import org .truffleruby .RubyContext ;
16
- import org .truffleruby .RubyLanguage ;
17
16
import org .truffleruby .core .hash .ConcatHashLiteralNode ;
18
17
import org .truffleruby .core .hash .HashLiteralNode ;
19
18
import org .truffleruby .language .RubyNode ;
@@ -62,8 +61,6 @@ public int getRestParameterIndex() {
62
61
63
62
@ Override
64
63
public RubyNode visitArgsNode (ArgsParseNode node ) {
65
- final SourceIndexLength sourceSection = node .getPosition ();
66
-
67
64
final List <RubyNode > sequence = new ArrayList <>();
68
65
final ParseNode [] args = node .getArgs ();
69
66
final int preCount = node .getPreCount ();
@@ -89,11 +86,16 @@ public RubyNode visitArgsNode(ArgsParseNode node) {
89
86
sequence .add (node .getRestArgNode ().accept (this ));
90
87
}
91
88
92
- if (node .getPostCount () > 0 ) {
93
- RubyLanguage .LOGGER .warning (
94
- String .format (
95
- "post args in zsuper not yet implemented at %s%n" ,
96
- RubyContext .fileLine (sourceSection .toSourceSection (source ))));
89
+ int postCount = node .getPostCount ();
90
+
91
+ if (postCount > 0 ) {
92
+ index = -1 ;
93
+
94
+ int postIndex = node .getPostIndex ();
95
+ for (int i = postCount - 1 ; i >= 0 ; i --) {
96
+ sequence .add (args [postIndex + i ].accept (this ));
97
+ index --;
98
+ }
97
99
}
98
100
99
101
RubyNode kwArgsNode = null ;
You can’t perform that action at this time.
0 commit comments