tree-sitter-ada/test/corpus/preprocessor.txt
Emmanuel Briot 7fe1b1edb4 Add support for gnatprep directives
They can be folded
2022-12-14 13:29:59 +01:00

56 lines
1.5 KiB
Plaintext

================================================================================
Preprocess-if (GNAT)
================================================================================
procedure P is
#if not CHECKING_MODE then
pragma Suppress (Access_Checks);
#end if;
begin
null;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
(identifier))
(non_empty_declarative_part
(gnatprep_declarative_if_statement
(expression
(term
(factor_not
(identifier))))
(non_empty_declarative_part
(pragma_g
(identifier)
(pragma_argument_association
(expression
(term
(identifier))))))))
(handled_sequence_of_statements
(null_statement)))))
================================================================================
Preprocess substitution (GNAT)
================================================================================
package P is
Flavour : constant F := $FLAVOR;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(package_specification
(identifier)
(object_declaration
(identifier)
(identifier)
(expression
(term
(gnatprep_identifier)))))))