@@ -3684,32 +3684,36 @@ static bool parse_inline_leading_annotation(rbs_parser_t *parser, rbs_ast_ruby_a
36843684 return true;
36853685 }
36863686 case kSKIP : {
3687- rbs_parser_advance (parser );
3688-
3689- rbs_range_t skip_range = parser -> current_token .range ;
3690- rbs_location_t * skip_loc = rbs_location_new (ALLOCATOR (), skip_range );
3691-
3692- rbs_location_t * comment_loc = NULL ;
3693- if (!parse_inline_comment (parser , & comment_loc )) {
3694- return false;
3687+ if (parser -> next_token2 .type == pCOLON ) {
3688+ return parse_inline_param_type_annotation (parser , annotation , rbs_range );
3689+ } else {
3690+ rbs_parser_advance (parser );
3691+
3692+ rbs_range_t skip_range = parser -> current_token .range ;
3693+ rbs_location_t * skip_loc = rbs_location_new (ALLOCATOR (), skip_range );
3694+
3695+ rbs_location_t * comment_loc = NULL ;
3696+ if (!parse_inline_comment (parser , & comment_loc )) {
3697+ return false;
3698+ }
3699+
3700+ rbs_range_t full_range = {
3701+ .start = rbs_range .start ,
3702+ .end = parser -> current_token .range .end
3703+ };
3704+
3705+ rbs_location_t * full_loc = rbs_location_new (ALLOCATOR (), full_range );
3706+ rbs_location_t * rbs_loc = rbs_location_new (ALLOCATOR (), rbs_range );
3707+
3708+ * annotation = (rbs_ast_ruby_annotations_t * ) rbs_ast_ruby_annotations_skip_annotation_new (
3709+ ALLOCATOR (),
3710+ full_loc ,
3711+ rbs_loc ,
3712+ skip_loc ,
3713+ comment_loc
3714+ );
3715+ return true;
36953716 }
3696-
3697- rbs_range_t full_range = {
3698- .start = rbs_range .start ,
3699- .end = parser -> current_token .range .end
3700- };
3701-
3702- rbs_location_t * full_loc = rbs_location_new (ALLOCATOR (), full_range );
3703- rbs_location_t * rbs_loc = rbs_location_new (ALLOCATOR (), rbs_range );
3704-
3705- * annotation = (rbs_ast_ruby_annotations_t * ) rbs_ast_ruby_annotations_skip_annotation_new (
3706- ALLOCATOR (),
3707- full_loc ,
3708- rbs_loc ,
3709- skip_loc ,
3710- comment_loc
3711- );
3712- return true;
37133717 }
37143718 case kRETURN : {
37153719 rbs_parser_advance (parser );
0 commit comments