@@ -1340,7 +1340,7 @@ static VALUE parse_global_decl(parserstate *state, VALUE annotations) {
13401340/*
13411341 const_decl ::= {const_name} `:` <type>
13421342*/
1343- static VALUE parse_const_decl (parserstate * state ) {
1343+ static VALUE parse_const_decl (parserstate * state , VALUE annotations ) {
13441344 range decl_range ;
13451345
13461346 decl_range .start = state -> current_token .range .start ;
@@ -1361,7 +1361,7 @@ static VALUE parse_const_decl(parserstate *state) {
13611361 rbs_loc_add_required_child (loc , INTERN ("name" ), name_range );
13621362 rbs_loc_add_required_child (loc , INTERN ("colon" ), colon_range );
13631363
1364- return rbs_ast_decl_constant (typename , type , location , comment );
1364+ return rbs_ast_decl_constant (typename , type , location , comment , annotations );
13651365}
13661366
13671367/*
@@ -2602,7 +2602,7 @@ static VALUE parse_nested_decl(parserstate *state, const char *nested_in, positi
26022602 switch (state -> current_token .type ) {
26032603 case tUIDENT :
26042604 case pCOLON2 : {
2605- decl = parse_const_decl (state );
2605+ decl = parse_const_decl (state , annotations );
26062606 break ;
26072607 }
26082608 case tGIDENT : {
@@ -2648,7 +2648,7 @@ static VALUE parse_decl(parserstate *state) {
26482648 switch (state -> current_token .type ) {
26492649 case tUIDENT :
26502650 case pCOLON2 : {
2651- return parse_const_decl (state );
2651+ return parse_const_decl (state , annotations );
26522652 }
26532653 case tGIDENT : {
26542654 return parse_global_decl (state , annotations );
0 commit comments