tree-sitter-bp/test/corpus/definitions.txt

97 lines
2.3 KiB
Plaintext

================================================================================
Empty file
================================================================================
--------------------------------------------------------------------------------
(source_file)
================================================================================
Integer assignment
================================================================================
foo = 42
--------------------------------------------------------------------------------
(source_file
(assignment
(identifier)
(integer_literal)))
================================================================================
Variable assignment
================================================================================
foo = bar
--------------------------------------------------------------------------------
(source_file
(assignment
(identifier)
(identifier)))
================================================================================
Addition assignement
================================================================================
foo += 12
--------------------------------------------------------------------------------
(source_file
(assignment
(identifier)
(integer_literal)))
================================================================================
Multiple assignments
================================================================================
foo = 12
bar = 27
--------------------------------------------------------------------------------
(source_file
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal)))
================================================================================
Various assignements
================================================================================
foo = 0
foo += 12
bar = 27
baz = 42
qux = 1
qux += 1
--------------------------------------------------------------------------------
(source_file
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal))
(assignment
(identifier)
(integer_literal)))