Commit Graph

57 Commits

Author SHA1 Message Date
Emmanuel Briot
5e125407b0 Add license
Fixes #4
2023-06-06 07:44:11 +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
e9e2ec9d3b Also highlight tagged and limited in type declarations. 2022-12-15 09:58:32 +01:00
Emmanuel Briot
0210164cce Replace type.definition with keyword.type
The former is meant for the actual identifier, not the keywords around
it.
2022-12-15 09:35:25 +01:00
Emmanuel Briot
7426f191a1 Explain how to generate Railroad diagrams for the grammar. 2022-12-15 09:29:06 +01:00
Emmanuel Briot
d625712fe1 Allow empty statements of declarations in gnatprep
All runtime files and all the code from Deep Blue Capital are now
parsed without errors.
2022-12-14 14:28:59 +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
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
dbd3401b14 A task type can contain pragmas
Not shown in the RM grammar, but explicit in 2.8
2022-12-14 12:31:43 +01:00
Emmanuel Briot
7b4bf400ab Task types may have no task_item
Based literals may have exponents
2022-12-14 12:24:09 +01:00
Emmanuel Briot
fb54a00c16 Allow pragmas inside records 2022-12-14 12:08:24 +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
c61d74d03a Fix parsing numeric literals with underscore in decimal part
The regexp adapted from Emacs' ada-mode was wrong,
and also not accept "E+..."
2022-12-14 11:05:55 +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
725a32a592 Fix handling of operator names in parameter_association 2022-12-14 10:06:22 +01:00
Emmanuel Briot
15b9745fff help tree-sitter with recognizing Ada files 2022-12-14 10:06:04 +01:00
Emmanuel Briot
c25792f45c Add support for slices 2022-12-13 12:29:02 +01:00
Emmanuel Briot
30545542d7 Remove no longer needed conflict clauses 2022-12-12 12:10:55 +01:00
Emmanuel Briot
4557f68292 Inline "statement" 2022-12-12 11:35:04 +01:00
Emmanuel Briot
d52ba823fa Add support for "or terminate" in select statements 2022-12-12 11:27:49 +01:00
Emmanuel Briot
d6ea15a3e0 Add support for double-quotes inside strings 2022-12-12 10:58:36 +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
de1a5f3038 Commit the generated files
This provides easier installation
2022-12-08 11:53:54 +01:00
Emmanuel Briot
1eafd432d7 Add queries for neovim 2022-12-08 11:53:03 +01:00
Emmanuel Briot
0a52f6df01 various attempts to simplify grammar
Fixes handing of expression functions (for which the expression was
 identified as an aggregate)
Move conditional expressions out of 'aggregate', to conform with ARM and
 resolve the above amgiguity
Inline expression_list, which was resulting in a conflict with a
 record_component_association.
2022-12-07 18:32:50 +01:00
Emmanuel Briot
974160cf9b Remove _direct_name, use identifier directly 2022-10-25 10:02:51 +02:00
Emmanuel Briot
fb5a2b68b0 Remove selector_name rule
Was a choice() with a single alternative
2022-10-25 09:58:04 +02:00
Emmanuel Briot
e06723eee2 Minor cleanups 2022-10-25 09:53:24 +02:00
Emmanuel Briot
464ba8c3da Range attribute 2022-10-25 09:24:41 +02:00
Emmanuel Briot
434dc1a695 Asynchronous select 2022-10-25 09:04:38 +02:00
Emmanuel Briot
b0f3476851 Support for protected types 2022-10-25 08:56:27 +02:00
Emmanuel Briot
e5245e8283 Support for task types 2022-10-25 08:30:55 +02:00
Emmanuel Briot
4433fab200 Add support for redefining operators 2022-10-24 15:56:08 +02:00
Emmanuel Briot
f32b258652 Support for tasks 2022-10-24 15:31:20 +02:00
Emmanuel Briot
779bebba99 Add support for separates 2022-10-24 14:57:08 +02:00
Emmanuel Briot
184f9ca9b8 support for discrete_range constraints 2022-10-24 14:48:54 +02:00
Emmanuel Briot
6f6cac7c84 Support for allocators 2022-10-24 14:45:14 +02:00
Emmanuel Briot
d440b2e820 Initial support for generics 2022-10-24 14:35:37 +02:00
Emmanuel Briot
59921871bb Add if statements 2022-10-24 14:08:39 +02:00
Emmanuel Briot
b100bdd8c1 Minor changes to README, point to ada-mode grammar 2022-10-24 13:38:12 +02:00
Emmanuel Briot
2db1b28fb6 Support for loop statements 2022-10-24 13:14:29 +02:00
Emmanuel Briot
ad302a74a2 Support for renaming declarations 2022-10-24 09:54:37 +02:00
Emmanuel Briot
bf801ce20e Support for record aggregates 2022-10-24 09:31:48 +02:00
Emmanuel Briot
c0b04e4be1 Some more cases of expression functions 2022-10-21 22:00:02 +02:00
Emmanuel Briot
8e44c8bc3b Initial support for subprograms 2022-10-21 18:51:04 +02:00