Skip to content

Commit 597d30a

Browse files
authored
Merge pull request #2873 from ruby/splat-param-type
Add splat (`*a`) and double-splat (`**a`) parameter support
2 parents b647968 + 330143e commit 597d30a

16 files changed

Lines changed: 718 additions & 98 deletions

File tree

config.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,40 @@ nodes:
798798
- name: comment_location
799799
c_type: rbs_location_range
800800
optional: true
801+
- name: RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation
802+
rust_name: SplatParamTypeAnnotationNode
803+
fields:
804+
- name: prefix_location
805+
c_type: rbs_location_range
806+
- name: star_location
807+
c_type: rbs_location_range
808+
- name: name_location
809+
c_type: rbs_location_range
810+
optional: true
811+
- name: colon_location
812+
c_type: rbs_location_range
813+
- name: param_type
814+
c_type: rbs_node
815+
- name: comment_location
816+
c_type: rbs_location_range
817+
optional: true
818+
- name: RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation
819+
rust_name: DoubleSplatParamTypeAnnotationNode
820+
fields:
821+
- name: prefix_location
822+
c_type: rbs_location_range
823+
- name: star2_location
824+
c_type: rbs_location_range
825+
- name: name_location
826+
c_type: rbs_location_range
827+
optional: true
828+
- name: colon_location
829+
c_type: rbs_location_range
830+
- name: param_type
831+
c_type: rbs_node
832+
- name: comment_location
833+
c_type: rbs_location_range
834+
optional: true
801835

802836
enums:
803837
attribute_visibility:

docs/inline.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ The `@rbs PARAM_NAME: T` syntax declares the type of a parameter:
227227
class Calculator
228228
# @rbs x: Integer
229229
# @rbs y: Integer
230-
def add(x, y:)
231-
x + y
230+
# @rbs a: String
231+
# @rbs b: bool
232+
def add(x, y = 1, a:, b: false)
233+
pp(x:, y:, a:, b:)
232234
end
233235
end
234236
```
@@ -237,10 +239,28 @@ You can add a description after `--`:
237239

238240
```ruby
239241
class Calculator
240-
# @rbs x: Integer -- the first operand
241-
# @rbs y: Integer -- the second operand
242-
def add(x, y:)
243-
x + y
242+
# @rbs x: Integer -- required positional argument
243+
# @rbs y: Integer -- optional positional argument
244+
# @rbs a: String -- required keyword argument
245+
# @rbs b: bool -- optional keyword argument
246+
def add(x, y = 1, a:, b: false)
247+
pp(x:, y:, a:, b:)
248+
end
249+
end
250+
```
251+
252+
Types of splat (`*a`) and double-splat (`**b`) parameters can be declared too.
253+
254+
```ruby
255+
class Foo
256+
# @rbs *a: String -- The type of `a` is `Array[String]`
257+
# @rbs **b: bool -- The type of `b` is `Hash[Symbol, bool]`
258+
def foo(*a, **b)
259+
end
260+
261+
# @rbs *: String -- Parameter name is optional
262+
# @rbs **: bool -- Parameter name can be omitted in Ruby too
263+
def bar(*a, **)
244264
end
245265
end
246266
```
@@ -272,7 +292,7 @@ end
272292
### Current Limitations
273293

274294
- Class methods and singleton methods are not supported
275-
- Only positional and keyword parameters are supported. Splat parameters (`*x`, `**y`) and block parameter (`&block`) are not supported yet.
295+
- Only positional and keyword parameters are supported. Splat parameters (`*x`, `**y`) and block parameter (`&block`) are not supported yet.
276296
- Method visibility declaration is not supported yet
277297

278298
## Attributes

ext/rbs_extension/ast_translation.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,24 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
859859
&h
860860
);
861861
}
862+
case RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION: {
863+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *node = (rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *) instance;
864+
865+
VALUE h = rb_hash_new();
866+
rb_hash_aset(h, ID2SYM(rb_intern("location")), rbs_location_range_to_ruby_location(ctx, node->base.location));
867+
rb_hash_aset(h, ID2SYM(rb_intern("prefix_location")), rbs_location_range_to_ruby_location(ctx, node->prefix_location));
868+
rb_hash_aset(h, ID2SYM(rb_intern("star2_location")), rbs_location_range_to_ruby_location(ctx, node->star2_location));
869+
rb_hash_aset(h, ID2SYM(rb_intern("name_location")), rbs_location_range_to_ruby_location(ctx, node->name_location)); // optional
870+
rb_hash_aset(h, ID2SYM(rb_intern("colon_location")), rbs_location_range_to_ruby_location(ctx, node->colon_location));
871+
rb_hash_aset(h, ID2SYM(rb_intern("param_type")), rbs_struct_to_ruby_value(ctx, (rbs_node_t *) node->param_type)); // rbs_node
872+
rb_hash_aset(h, ID2SYM(rb_intern("comment_location")), rbs_location_range_to_ruby_location(ctx, node->comment_location)); // optional
873+
874+
return CLASS_NEW_INSTANCE(
875+
RBS_AST_Ruby_Annotations_DoubleSplatParamTypeAnnotation,
876+
1,
877+
&h
878+
);
879+
}
862880
case RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION: {
863881
rbs_ast_ruby_annotations_instance_variable_annotation_t *node = (rbs_ast_ruby_annotations_instance_variable_annotation_t *) instance;
864882

@@ -972,6 +990,24 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
972990
&h
973991
);
974992
}
993+
case RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION: {
994+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *node = (rbs_ast_ruby_annotations_splat_param_type_annotation_t *) instance;
995+
996+
VALUE h = rb_hash_new();
997+
rb_hash_aset(h, ID2SYM(rb_intern("location")), rbs_location_range_to_ruby_location(ctx, node->base.location));
998+
rb_hash_aset(h, ID2SYM(rb_intern("prefix_location")), rbs_location_range_to_ruby_location(ctx, node->prefix_location));
999+
rb_hash_aset(h, ID2SYM(rb_intern("star_location")), rbs_location_range_to_ruby_location(ctx, node->star_location));
1000+
rb_hash_aset(h, ID2SYM(rb_intern("name_location")), rbs_location_range_to_ruby_location(ctx, node->name_location)); // optional
1001+
rb_hash_aset(h, ID2SYM(rb_intern("colon_location")), rbs_location_range_to_ruby_location(ctx, node->colon_location));
1002+
rb_hash_aset(h, ID2SYM(rb_intern("param_type")), rbs_struct_to_ruby_value(ctx, (rbs_node_t *) node->param_type)); // rbs_node
1003+
rb_hash_aset(h, ID2SYM(rb_intern("comment_location")), rbs_location_range_to_ruby_location(ctx, node->comment_location)); // optional
1004+
1005+
return CLASS_NEW_INSTANCE(
1006+
RBS_AST_Ruby_Annotations_SplatParamTypeAnnotation,
1007+
1,
1008+
&h
1009+
);
1010+
}
9751011
case RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION: {
9761012
rbs_ast_ruby_annotations_type_application_annotation_t *node = (rbs_ast_ruby_annotations_type_application_annotation_t *) instance;
9771013

ext/rbs_extension/class_constants.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ VALUE RBS_AST_Members_Private;
4949
VALUE RBS_AST_Members_Public;
5050
VALUE RBS_AST_Ruby_Annotations_ClassAliasAnnotation;
5151
VALUE RBS_AST_Ruby_Annotations_ColonMethodTypeAnnotation;
52+
VALUE RBS_AST_Ruby_Annotations_DoubleSplatParamTypeAnnotation;
5253
VALUE RBS_AST_Ruby_Annotations_InstanceVariableAnnotation;
5354
VALUE RBS_AST_Ruby_Annotations_MethodTypesAnnotation;
5455
VALUE RBS_AST_Ruby_Annotations_ModuleAliasAnnotation;
5556
VALUE RBS_AST_Ruby_Annotations_NodeTypeAssertion;
5657
VALUE RBS_AST_Ruby_Annotations_ParamTypeAnnotation;
5758
VALUE RBS_AST_Ruby_Annotations_ReturnTypeAnnotation;
5859
VALUE RBS_AST_Ruby_Annotations_SkipAnnotation;
60+
VALUE RBS_AST_Ruby_Annotations_SplatParamTypeAnnotation;
5961
VALUE RBS_AST_Ruby_Annotations_TypeApplicationAnnotation;
6062
VALUE RBS_AST_TypeParam;
6163
VALUE RBS_MethodType;
@@ -139,13 +141,15 @@ void rbs__init_constants(void) {
139141
IMPORT_CONSTANT(RBS_AST_Members_Public, RBS_AST_Members, "Public");
140142
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_ClassAliasAnnotation, RBS_AST_Ruby_Annotations, "ClassAliasAnnotation");
141143
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_ColonMethodTypeAnnotation, RBS_AST_Ruby_Annotations, "ColonMethodTypeAnnotation");
144+
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_DoubleSplatParamTypeAnnotation, RBS_AST_Ruby_Annotations, "DoubleSplatParamTypeAnnotation");
142145
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_InstanceVariableAnnotation, RBS_AST_Ruby_Annotations, "InstanceVariableAnnotation");
143146
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_MethodTypesAnnotation, RBS_AST_Ruby_Annotations, "MethodTypesAnnotation");
144147
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_ModuleAliasAnnotation, RBS_AST_Ruby_Annotations, "ModuleAliasAnnotation");
145148
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_NodeTypeAssertion, RBS_AST_Ruby_Annotations, "NodeTypeAssertion");
146149
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_ParamTypeAnnotation, RBS_AST_Ruby_Annotations, "ParamTypeAnnotation");
147150
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_ReturnTypeAnnotation, RBS_AST_Ruby_Annotations, "ReturnTypeAnnotation");
148151
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_SkipAnnotation, RBS_AST_Ruby_Annotations, "SkipAnnotation");
152+
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_SplatParamTypeAnnotation, RBS_AST_Ruby_Annotations, "SplatParamTypeAnnotation");
149153
IMPORT_CONSTANT(RBS_AST_Ruby_Annotations_TypeApplicationAnnotation, RBS_AST_Ruby_Annotations, "TypeApplicationAnnotation");
150154
IMPORT_CONSTANT(RBS_AST_TypeParam, RBS_AST, "TypeParam");
151155
IMPORT_CONSTANT(RBS_MethodType, RBS, "MethodType");

ext/rbs_extension/class_constants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ extern VALUE RBS_AST_Members_Private;
5757
extern VALUE RBS_AST_Members_Public;
5858
extern VALUE RBS_AST_Ruby_Annotations_ClassAliasAnnotation;
5959
extern VALUE RBS_AST_Ruby_Annotations_ColonMethodTypeAnnotation;
60+
extern VALUE RBS_AST_Ruby_Annotations_DoubleSplatParamTypeAnnotation;
6061
extern VALUE RBS_AST_Ruby_Annotations_InstanceVariableAnnotation;
6162
extern VALUE RBS_AST_Ruby_Annotations_MethodTypesAnnotation;
6263
extern VALUE RBS_AST_Ruby_Annotations_ModuleAliasAnnotation;
6364
extern VALUE RBS_AST_Ruby_Annotations_NodeTypeAssertion;
6465
extern VALUE RBS_AST_Ruby_Annotations_ParamTypeAnnotation;
6566
extern VALUE RBS_AST_Ruby_Annotations_ReturnTypeAnnotation;
6667
extern VALUE RBS_AST_Ruby_Annotations_SkipAnnotation;
68+
extern VALUE RBS_AST_Ruby_Annotations_SplatParamTypeAnnotation;
6769
extern VALUE RBS_AST_Ruby_Annotations_TypeApplicationAnnotation;
6870
extern VALUE RBS_AST_TypeParam;
6971
extern VALUE RBS_MethodType;

include/rbs/ast.h

Lines changed: 66 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -92,46 +92,48 @@ enum rbs_node_type {
9292
RBS_AST_MEMBERS_PUBLIC = 31,
9393
RBS_AST_RUBY_ANNOTATIONS_CLASS_ALIAS_ANNOTATION = 32,
9494
RBS_AST_RUBY_ANNOTATIONS_COLON_METHOD_TYPE_ANNOTATION = 33,
95-
RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION = 34,
96-
RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 35,
97-
RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION = 36,
98-
RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 37,
99-
RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION = 38,
100-
RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 39,
101-
RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 40,
102-
RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION = 41,
103-
RBS_AST_STRING = 42,
104-
RBS_AST_TYPE_PARAM = 43,
105-
RBS_METHOD_TYPE = 44,
106-
RBS_NAMESPACE = 45,
107-
RBS_SIGNATURE = 46,
108-
RBS_TYPE_NAME = 47,
109-
RBS_TYPES_ALIAS = 48,
110-
RBS_TYPES_BASES_ANY = 49,
111-
RBS_TYPES_BASES_BOOL = 50,
112-
RBS_TYPES_BASES_BOTTOM = 51,
113-
RBS_TYPES_BASES_CLASS = 52,
114-
RBS_TYPES_BASES_INSTANCE = 53,
115-
RBS_TYPES_BASES_NIL = 54,
116-
RBS_TYPES_BASES_SELF = 55,
117-
RBS_TYPES_BASES_TOP = 56,
118-
RBS_TYPES_BASES_VOID = 57,
119-
RBS_TYPES_BLOCK = 58,
120-
RBS_TYPES_CLASS_INSTANCE = 59,
121-
RBS_TYPES_CLASS_SINGLETON = 60,
122-
RBS_TYPES_FUNCTION = 61,
123-
RBS_TYPES_FUNCTION_PARAM = 62,
124-
RBS_TYPES_INTERFACE = 63,
125-
RBS_TYPES_INTERSECTION = 64,
126-
RBS_TYPES_LITERAL = 65,
127-
RBS_TYPES_OPTIONAL = 66,
128-
RBS_TYPES_PROC = 67,
129-
RBS_TYPES_RECORD = 68,
130-
RBS_TYPES_RECORD_FIELD_TYPE = 69,
131-
RBS_TYPES_TUPLE = 70,
132-
RBS_TYPES_UNION = 71,
133-
RBS_TYPES_UNTYPED_FUNCTION = 72,
134-
RBS_TYPES_VARIABLE = 73,
95+
RBS_AST_RUBY_ANNOTATIONS_DOUBLE_SPLAT_PARAM_TYPE_ANNOTATION = 34,
96+
RBS_AST_RUBY_ANNOTATIONS_INSTANCE_VARIABLE_ANNOTATION = 35,
97+
RBS_AST_RUBY_ANNOTATIONS_METHOD_TYPES_ANNOTATION = 36,
98+
RBS_AST_RUBY_ANNOTATIONS_MODULE_ALIAS_ANNOTATION = 37,
99+
RBS_AST_RUBY_ANNOTATIONS_NODE_TYPE_ASSERTION = 38,
100+
RBS_AST_RUBY_ANNOTATIONS_PARAM_TYPE_ANNOTATION = 39,
101+
RBS_AST_RUBY_ANNOTATIONS_RETURN_TYPE_ANNOTATION = 40,
102+
RBS_AST_RUBY_ANNOTATIONS_SKIP_ANNOTATION = 41,
103+
RBS_AST_RUBY_ANNOTATIONS_SPLAT_PARAM_TYPE_ANNOTATION = 42,
104+
RBS_AST_RUBY_ANNOTATIONS_TYPE_APPLICATION_ANNOTATION = 43,
105+
RBS_AST_STRING = 44,
106+
RBS_AST_TYPE_PARAM = 45,
107+
RBS_METHOD_TYPE = 46,
108+
RBS_NAMESPACE = 47,
109+
RBS_SIGNATURE = 48,
110+
RBS_TYPE_NAME = 49,
111+
RBS_TYPES_ALIAS = 50,
112+
RBS_TYPES_BASES_ANY = 51,
113+
RBS_TYPES_BASES_BOOL = 52,
114+
RBS_TYPES_BASES_BOTTOM = 53,
115+
RBS_TYPES_BASES_CLASS = 54,
116+
RBS_TYPES_BASES_INSTANCE = 55,
117+
RBS_TYPES_BASES_NIL = 56,
118+
RBS_TYPES_BASES_SELF = 57,
119+
RBS_TYPES_BASES_TOP = 58,
120+
RBS_TYPES_BASES_VOID = 59,
121+
RBS_TYPES_BLOCK = 60,
122+
RBS_TYPES_CLASS_INSTANCE = 61,
123+
RBS_TYPES_CLASS_SINGLETON = 62,
124+
RBS_TYPES_FUNCTION = 63,
125+
RBS_TYPES_FUNCTION_PARAM = 64,
126+
RBS_TYPES_INTERFACE = 65,
127+
RBS_TYPES_INTERSECTION = 66,
128+
RBS_TYPES_LITERAL = 67,
129+
RBS_TYPES_OPTIONAL = 68,
130+
RBS_TYPES_PROC = 69,
131+
RBS_TYPES_RECORD = 70,
132+
RBS_TYPES_RECORD_FIELD_TYPE = 71,
133+
RBS_TYPES_TUPLE = 72,
134+
RBS_TYPES_UNION = 73,
135+
RBS_TYPES_UNTYPED_FUNCTION = 74,
136+
RBS_TYPES_VARIABLE = 75,
135137
RBS_AST_SYMBOL,
136138
};
137139

@@ -577,6 +579,17 @@ typedef struct rbs_ast_ruby_annotations_colon_method_type_annotation {
577579
struct rbs_node *method_type;
578580
} rbs_ast_ruby_annotations_colon_method_type_annotation_t;
579581

582+
typedef struct rbs_ast_ruby_annotations_double_splat_param_type_annotation {
583+
rbs_node_t base;
584+
585+
rbs_location_range prefix_location;
586+
rbs_location_range star2_location;
587+
rbs_location_range name_location; /* Optional */
588+
rbs_location_range colon_location;
589+
struct rbs_node *param_type;
590+
rbs_location_range comment_location; /* Optional */
591+
} rbs_ast_ruby_annotations_double_splat_param_type_annotation_t;
592+
580593
typedef struct rbs_ast_ruby_annotations_instance_variable_annotation {
581594
rbs_node_t base;
582595

@@ -641,6 +654,17 @@ typedef struct rbs_ast_ruby_annotations_skip_annotation {
641654
rbs_location_range comment_location; /* Optional */
642655
} rbs_ast_ruby_annotations_skip_annotation_t;
643656

657+
typedef struct rbs_ast_ruby_annotations_splat_param_type_annotation {
658+
rbs_node_t base;
659+
660+
rbs_location_range prefix_location;
661+
rbs_location_range star_location;
662+
rbs_location_range name_location; /* Optional */
663+
rbs_location_range colon_location;
664+
struct rbs_node *param_type;
665+
rbs_location_range comment_location; /* Optional */
666+
} rbs_ast_ruby_annotations_splat_param_type_annotation_t;
667+
644668
typedef struct rbs_ast_ruby_annotations_type_application_annotation {
645669
rbs_node_t base;
646670

@@ -937,13 +961,15 @@ rbs_ast_members_private_t *rbs_ast_members_private_new(rbs_allocator_t *allocato
937961
rbs_ast_members_public_t *rbs_ast_members_public_new(rbs_allocator_t *allocator, rbs_location_range location);
938962
rbs_ast_ruby_annotations_class_alias_annotation_t *rbs_ast_ruby_annotations_class_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location);
939963
rbs_ast_ruby_annotations_colon_method_type_annotation_t *rbs_ast_ruby_annotations_colon_method_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *annotations, rbs_node_t *method_type);
964+
rbs_ast_ruby_annotations_double_splat_param_type_annotation_t *rbs_ast_ruby_annotations_double_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star2_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
940965
rbs_ast_ruby_annotations_instance_variable_annotation_t *rbs_ast_ruby_annotations_instance_variable_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_ast_symbol_t *ivar_name, rbs_location_range ivar_name_location, rbs_location_range colon_location, rbs_node_t *type, rbs_location_range comment_location);
941966
rbs_ast_ruby_annotations_method_types_annotation_t *rbs_ast_ruby_annotations_method_types_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *overloads, rbs_location_range_list_t *vertical_bar_locations, rbs_location_range dot3_location);
942967
rbs_ast_ruby_annotations_module_alias_annotation_t *rbs_ast_ruby_annotations_module_alias_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range keyword_location, rbs_type_name_t *type_name, rbs_location_range type_name_location);
943968
rbs_ast_ruby_annotations_node_type_assertion_t *rbs_ast_ruby_annotations_node_type_assertion_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_t *type);
944969
rbs_ast_ruby_annotations_param_type_annotation_t *rbs_ast_ruby_annotations_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
945970
rbs_ast_ruby_annotations_return_type_annotation_t *rbs_ast_ruby_annotations_return_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range return_location, rbs_location_range colon_location, rbs_node_t *return_type, rbs_location_range comment_location);
946971
rbs_ast_ruby_annotations_skip_annotation_t *rbs_ast_ruby_annotations_skip_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range skip_location, rbs_location_range comment_location);
972+
rbs_ast_ruby_annotations_splat_param_type_annotation_t *rbs_ast_ruby_annotations_splat_param_type_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_location_range star_location, rbs_location_range name_location, rbs_location_range colon_location, rbs_node_t *param_type, rbs_location_range comment_location);
947973
rbs_ast_ruby_annotations_type_application_annotation_t *rbs_ast_ruby_annotations_type_application_annotation_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_location_range prefix_location, rbs_node_list_t *type_args, rbs_location_range close_bracket_location, rbs_location_range_list_t *comma_locations);
948974
rbs_ast_string_t *rbs_ast_string_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_string_t string);
949975
rbs_ast_type_param_t *rbs_ast_type_param_new(rbs_allocator_t *allocator, rbs_location_range location, rbs_ast_symbol_t *name, enum rbs_type_param_variance variance, rbs_node_t *upper_bound, rbs_node_t *lower_bound, rbs_node_t *default_type, bool unchecked, rbs_location_range name_range);

0 commit comments

Comments
 (0)