tree-sitter-ada/test/corpus/literals.txt
Emmanuel Briot 7b4bf400ab Task types may have no task_item
Based literals may have exponents
2022-12-14 12:24:09 +01:00

68 lines
1.6 KiB
Plaintext

================================================================================
String literals
================================================================================
A : String := "12'34";
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(object_declaration
(identifier)
(identifier)
(expression
(term
(string_literal))))))
================================================================================
String literals with quotes
================================================================================
A : String := "12""23";
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(object_declaration
(identifier)
(identifier)
(expression
(term
(string_literal))))))
================================================================================
Numeric literals with underscore
================================================================================
A : Integer := 12_14.12_122E+11_2;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(object_declaration
(identifier)
(identifier)
(expression
(term
(numeric_literal))))))
=======================
Based numerals
=======================
A : Integer := 16#FA01#E+02;
-----
(compilation
(compilation_unit
(object_declaration
(identifier)
(identifier)
(expression
(term
(numeric_literal))))))