Commit Graph

12 Commits

Author SHA1 Message Date
Troy Brown
6c3dc1f0ae Correct parsing of discriminant constraints in allocators.
The existing grammar was causing discriminant constraints in
allocators to be incorrectly parsed as function calls.  This change
modifies the grammar to more accurately follow the grammar of the
language and corrects the issue.

Updated the test corpus to add additional allocator tests with
numerous subtype indications and qualified expressions for more
extensive testing.
2024-05-22 21:12:41 +02:00
Piotr Trojanek
4312cfd8ba 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.
2024-01-05 08:24:33 +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
7fe1b1edb4 Add support for gnatprep directives
They can be folded
2022-12-14 13:29:59 +01:00
Emmanuel Briot
39697ddca8 fix support of pragmas inside exception handlers
This was copied from ada_mode, but results in
 confusion when we have statements after the pragma

Fix allocates with if-expression, which no longer
 needs double-parenthesis.
2022-12-14 12:59:09 +01:00
Emmanuel Briot
c25792f45c Add support for slices 2022-12-13 12:29:02 +01:00
Emmanuel Briot
4557f68292 Inline "statement" 2022-12-12 11:35:04 +01:00
Emmanuel Briot
ec82f7b2cf Fix support for Func(...).Value
Need to set associativity on selected_component
2022-12-12 10:50:59 +01:00
Emmanuel Briot
7bd8543b71 Fix error for access parameters and untyped constants 2022-12-09 14:38:08 +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