Commit Graph

5 Commits

Author SHA1 Message Date
Piotr Trojanek
07019a9929 Accept declare expression in pragma
(_conditional_quantified_expression): accept declare expression; rename

Fixes parsing error that occurred in GNATprove source code.

add test.
2024-01-05 08:19:05 +01:00
Piotr Trojanek
a1e54e4e03 Accept pragmas within declare expressions
(_declare_item): accept pragmas

Assert pragmas (and other "executable" pragmas) are specifically allowed
in declare expressions, thanks to a recent AI22-0045. They are accepted
by the latest GNAT compilers.

Regenerate grammar using tree-sitter-linux-x64-0.20.7; add test.
2024-01-03 14:43:22 +01: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
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
fb54a00c16 Allow pragmas inside records 2022-12-14 12:08:24 +01:00