Commit Graph

11 Commits

Author SHA1 Message Date
Piotr Trojanek
ba0894efa0 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.
2024-01-05 08:33:41 +01:00
Troy Brown
f21f13afe0 Correct parsing of discrete_choice expressions.
The existing grammar was causing simple expressions to be incorrectly
parsed as a subtype indication.  This change raises the precedence for
a discrete choice expression to address that issue.

Updated the test corpus to reflect the parsing correction.  Additional
test cases were added for discrete choice.
2023-09-05 09:17:27 +02:00
Emmanuel Briot
42cc2eb141 (package_specification): now hidden in trees
Instead, package_declaration replaces it.  This provides
 better folding in nvim: otherwise, the final ';' was not
 part of the tree node, and thus the last line "end P;" was
 not folded.
2023-02-13 13:51:44 +01:00
Emmanuel Briot
faa006e5fd Allow if-expression for discriminant constraints
The rule (not visible in the RM grammar) is that
if we have a single positional discriminant, we
can omit the extra pair of parenthesis.
2022-12-14 13:49:02 +01:00
Emmanuel Briot
b9645c74b2 Add discriminant_constraint 2022-12-14 11:55:25 +01:00
Emmanuel Briot
a63a4f53d3 (extension with aggregates): allow a single positional item 2022-12-14 11:19:43 +01:00
Emmanuel Briot
6903869a00 Fix handling of variant records
Having two component_item followed by a variant_part
was not accepted
2022-12-14 10:44:51 +01:00
Emmanuel Briot
4557f68292 Inline "statement" 2022-12-12 11:35:04 +01:00
Emmanuel Briot
3b5200c14c Inline all rules that do not consume any character directly
This simplifies the trees significantly.
2022-12-09 12:32:06 +01:00
Emmanuel Briot
a41588c541 Various inlining of rules to simplify tree 2022-12-09 11:02:26 +01:00
Emmanuel Briot
1eafd432d7 Add queries for neovim 2022-12-08 11:53:03 +01:00