File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ public int getArityNumber() {
123
123
}
124
124
125
125
public ArgumentDescriptor [] getArgumentDescriptors () {
126
- return argumentDescriptors == null ? arity .toAnonymousArgumentDescriptors () : argumentDescriptors ;
126
+ return argumentDescriptors == null ? arity .toUnnamedArgumentDescriptors () : argumentDescriptors ;
127
127
}
128
128
129
129
// region SourceLocation
Original file line number Diff line number Diff line change @@ -164,31 +164,31 @@ public String[] getRequiredKeywordArguments() {
164
164
return requiredKeywords ;
165
165
}
166
166
167
- public ArgumentDescriptor [] toAnonymousArgumentDescriptors () {
167
+ public ArgumentDescriptor [] toUnnamedArgumentDescriptors () {
168
168
List <ArgumentDescriptor > descs = new ArrayList <>();
169
169
170
170
for (int i = 0 ; i < preRequired ; i ++) {
171
- descs .add (new ArgumentDescriptor (ArgumentType .anonreq ));
171
+ descs .add (new ArgumentDescriptor (ArgumentType .unnamedreq ));
172
172
}
173
173
174
174
for (int i = 0 ; i < optional ; i ++) {
175
- descs .add (new ArgumentDescriptor (ArgumentType .anonopt ));
175
+ descs .add (new ArgumentDescriptor (ArgumentType .unnamedopt ));
176
176
}
177
177
178
178
if (hasRest ) {
179
- descs .add (new ArgumentDescriptor (ArgumentType .anonrest ));
179
+ descs .add (new ArgumentDescriptor (ArgumentType .unnamedrest ));
180
180
}
181
181
182
182
for (int i = 0 ; i < postRequired ; i ++) {
183
- descs .add (new ArgumentDescriptor (ArgumentType .anonreq ));
183
+ descs .add (new ArgumentDescriptor (ArgumentType .unnamedreq ));
184
184
}
185
185
186
186
for (String keyword : keywordArguments ) {
187
187
descs .add (new ArgumentDescriptor (ArgumentType .key , keyword ));
188
188
}
189
189
190
190
if (hasKeywordsRest ) {
191
- descs .add (new ArgumentDescriptor (ArgumentType .anonkeyrest ));
191
+ descs .add (new ArgumentDescriptor (ArgumentType .unnamedkeyrest ));
192
192
}
193
193
194
194
return descs .toArray (ArgumentDescriptor .EMPTY_ARRAY );
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public ArgumentDescriptor[] getRawArgumentDescriptors() {
116
116
}
117
117
118
118
public ArgumentDescriptor [] getArgumentDescriptors () {
119
- return argumentDescriptors == null ? arity .toAnonymousArgumentDescriptors () : argumentDescriptors ;
119
+ return argumentDescriptors == null ? arity .toUnnamedArgumentDescriptors () : argumentDescriptors ;
120
120
}
121
121
122
122
public boolean isBlock () {
Original file line number Diff line number Diff line change @@ -36,12 +36,14 @@ public enum ArgumentType {
36
36
rest ("rest" , false ),
37
37
req ("req" , false ),
38
38
anonreq ("req" , true ),
39
- anonopt ("opt" , true ),
40
39
anonrest ("rest" , true ),
41
40
anonkeyrest ("keyrest" , true ),
42
- anonblock ("block" , true ),
41
+ unnamedreq ("req" , true ),
42
+ unnamedopt ("opt" , true ),
43
43
unnamedrest ("rest" , true ),
44
- nokey ("nokey" , true ); // **nil
44
+ unnamedkeyrest ("keyrest" , true ),
45
+
46
+ nokey ("nokey" , true );
45
47
46
48
ArgumentType (String symbolicName , boolean anonymous ) {
47
49
this .symbolicName = symbolicName ;
You can’t perform that action at this time.
0 commit comments