tree-sitter-ada/test/corpus/literals.txt
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

51 lines
1.3 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))))))