Accept aspect specification for extended return object
(extended_return_object_declaration): accept aspect_specification In accordance with Ada 2022 RM 6.5(2.1/5); this was not allowed in Ada 2012, but was changed in AI12-0398-1/03. add test.
This commit is contained in:
parent
5a2bff7cea
commit
4312cfd8ba
|
|
@ -2294,6 +2294,7 @@ module.exports = grammar({
|
|||
optional(reservedWord('constant')),
|
||||
$._return_subtype_indication,
|
||||
optional($._assign_value),
|
||||
optional($.aspect_specification),
|
||||
),
|
||||
_return_subtype_indication: $ => choice(
|
||||
$._subtype_indication,
|
||||
|
|
|
|||
|
|
@ -14549,6 +14549,18 @@
|
|||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "aspect_specification"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3902,6 +3902,10 @@
|
|||
"type": "access_definition",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "aspect_specification",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "delta_constraint",
|
||||
"named": true
|
||||
|
|
|
|||
65917
src/parser.c
65917
src/parser.c
File diff suppressed because it is too large
Load Diff
|
|
@ -157,6 +157,11 @@ begin
|
|||
return A : My_Rec := (F => 1) do
|
||||
null;
|
||||
end return;
|
||||
return Y : Integer
|
||||
with Address => X'Address
|
||||
do
|
||||
null;
|
||||
end return;
|
||||
end F;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -186,6 +191,22 @@ end F;
|
|||
(expression
|
||||
(term
|
||||
(numeric_literal))))))))
|
||||
(handled_sequence_of_statements
|
||||
(null_statement)))
|
||||
(extended_return_statement
|
||||
(extended_return_object_declaration
|
||||
(identifier)
|
||||
(identifier)
|
||||
(aspect_specification
|
||||
(aspect_mark_list
|
||||
(aspect_association
|
||||
(identifier)
|
||||
(expression
|
||||
(term
|
||||
(identifier)
|
||||
(tick)
|
||||
(attribute_designator
|
||||
(identifier))))))))
|
||||
(handled_sequence_of_statements
|
||||
(null_statement))))
|
||||
(identifier))))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user