tree-sitter-dust/corpus/tests.txt

167 lines
1.7 KiB
Plaintext

==================
Comments
==================
# x = 1;
# unassigned_variable
x # xyz
---
(source_file
(comment)
(comment)
(expression
(identifier))
(comment))
==================
Identifiers
==================
variable_name
_unused_variable
__strange_format__
a
blahblah
x.x
---
(source_file
(expression
(identifier))
(expression
(identifier))
(expression
(identifier))
(expression
(identifier))
(expression
(identifier))
(expression
(identifier)))
==================
Operators
==================
x = y + y;
---
(source_file
(expression
(identifier)
(operator)
(expression
(identifier)
(operator)
(expression
(identifier))))
(chain))
==================
String
==================
"string"
---
(source_file
(expression
(value
(string))))
==================
Integer
==================
1
---
(source_file
(expression
(value
(integer))))
==================
Float
==================
1.0
---
(source_file
(expression
(value
(float))))
==================
List
==================
(1, 2)
---
(source_file
(expression
(value
(list
(expression
(value
(integer)))
(expression
(value
(integer)))))))
==================
Empty
==================
()
---
(source_file
(expression
(value
(empty))))
==================
Tool
==================
random_boolean();
---
(source_file
(expression
(tool))
(expression
(value
(empty)))
(chain))
==================
Boolean
==================
true false
---
(source_file
(expression
(value
(boolean)))
(expression
(value
(boolean))))