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:
parent
1302d7fb0b
commit
ba0894efa0
|
|
@ -907,6 +907,7 @@ module.exports = grammar({
|
||||||
$.access_definition,
|
$.access_definition,
|
||||||
),
|
),
|
||||||
optional($._assign_value),
|
optional($._assign_value),
|
||||||
|
optional($.aspect_specification),
|
||||||
),
|
),
|
||||||
_type_definition: $ => choice(
|
_type_definition: $ => choice(
|
||||||
$.enumeration_type_definition,
|
$.enumeration_type_definition,
|
||||||
|
|
|
||||||
|
|
@ -4939,6 +4939,18 @@
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "aspect_specification"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BLANK"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2690,6 +2690,10 @@
|
||||||
"type": "access_definition",
|
"type": "access_definition",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "aspect_specification",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "expression",
|
"type": "expression",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
|
||||||
65089
src/parser.c
65089
src/parser.c
File diff suppressed because it is too large
Load Diff
|
|
@ -109,7 +109,7 @@ Discriminated
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
package P is
|
package P is
|
||||||
type R (A : Integer; B : Integer) is record
|
type R (A : Integer; B : Integer with Import) is record
|
||||||
F : Float;
|
F : Float;
|
||||||
end record;
|
end record;
|
||||||
end;
|
end;
|
||||||
|
|
@ -129,7 +129,11 @@ end;
|
||||||
(identifier))
|
(identifier))
|
||||||
(discriminant_specification
|
(discriminant_specification
|
||||||
(identifier)
|
(identifier)
|
||||||
(identifier))))
|
(identifier)
|
||||||
|
(aspect_specification
|
||||||
|
(aspect_mark_list
|
||||||
|
(aspect_association
|
||||||
|
(identifier)))))))
|
||||||
(record_type_definition
|
(record_type_definition
|
||||||
(record_definition
|
(record_definition
|
||||||
(component_list
|
(component_list
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user