Accept aspect specification for discriminant specification

(discriminant_specification): accept aspect_specification

In accordance with Ada 2022 RM 3.7(5/5); this was not allowed in Ada
2012, but was changed in AI12-0398-1/03.

extend test.
This commit is contained in:
Piotr Trojanek 2024-01-03 18:23:15 +01:00 committed by Emmanuel Briot
parent 1302d7fb0b
commit ba0894efa0
5 changed files with 32608 additions and 32506 deletions

View File

@ -907,6 +907,7 @@ module.exports = grammar({
$.access_definition,
),
optional($._assign_value),
optional($.aspect_specification),
),
_type_definition: $ => choice(
$.enumeration_type_definition,

View File

@ -4939,6 +4939,18 @@
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "aspect_specification"
},
{
"type": "BLANK"
}
]
}
]
},

View File

@ -2690,6 +2690,10 @@
"type": "access_definition",
"named": true
},
{
"type": "aspect_specification",
"named": true
},
{
"type": "expression",
"named": true

65089
src/parser.c

File diff suppressed because it is too large Load Diff

View File

@ -109,7 +109,7 @@ Discriminated
================================================================================
package P is
type R (A : Integer; B : Integer) is record
type R (A : Integer; B : Integer with Import) is record
F : Float;
end record;
end;
@ -129,7 +129,11 @@ end;
(identifier))
(discriminant_specification
(identifier)
(identifier))))
(identifier)
(aspect_specification
(aspect_mark_list
(aspect_association
(identifier)))))))
(record_type_definition
(record_definition
(component_list