tree-sitter-tiger/test/corpus/expressions.txt

88 lines
2.5 KiB
Plaintext
Raw Normal View History

2022-06-01 19:48:54 +02:00
================================================================================
Array expression
================================================================================
array_of_int[42] of 0
--------------------------------------------------------------------------------
(source_file
(array_expression
type: (identifier)
size: (integer_literal)
init: (integer_literal)))
================================================================================
Array associativity
================================================================================
array_of_array_of_int[12] of array_of_int[27] of 0
--------------------------------------------------------------------------------
(source_file
(array_expression
type: (identifier)
size: (integer_literal)
init: (array_expression
type: (identifier)
size: (integer_literal)
init: (integer_literal))))
2022-06-01 19:54:09 +02:00
================================================================================
Record expression
================================================================================
record_type { a = 12, b = "27" }
--------------------------------------------------------------------------------
(source_file
(record_expression
type: (identifier)
field: (identifier)
init: (integer_literal)
field: (identifier)
init: (string_literal)))
================================================================================
Record expression single field
================================================================================
record_type { a = 12 }
--------------------------------------------------------------------------------
(source_file
(record_expression
type: (identifier)
field: (identifier)
init: (integer_literal)))
================================================================================
Record expression no fields
================================================================================
record_type {}
--------------------------------------------------------------------------------
(source_file
(record_expression
type: (identifier)))
================================================================================
Record expression trailing comma
================================================================================
record_type { a = 12, }
--------------------------------------------------------------------------------
(source_file
(record_expression
type: (identifier)
field: (identifier)
init: (integer_literal)
(ERROR)))