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

108 lines
2.5 KiB
Plaintext

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