aboutsummaryrefslogtreecommitdiff
path: root/tools/tree-sitter/test/corpus/const_var_chain.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tree-sitter/test/corpus/const_var_chain.txt')
-rw-r--r--tools/tree-sitter/test/corpus/const_var_chain.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/tree-sitter/test/corpus/const_var_chain.txt b/tools/tree-sitter/test/corpus/const_var_chain.txt
new file mode 100644
index 0000000..fca40c9
--- /dev/null
+++ b/tools/tree-sitter/test/corpus/const_var_chain.txt
@@ -0,0 +1,37 @@
+==================
+const_var_chain
+==================
+
+program()
+var
+ x: const Int := 42
+ y: Int := x
+
+begin
+ assert(y = 42)
+end.
+
+---
+
+(source_file
+ (program_declaration
+ (var_section
+ (variable_declaration
+ (identifier_definition
+ (identifier))
+ (const_type
+ (identifier))
+ (literal
+ (integer)))
+ (variable_declaration
+ (identifier_definition
+ (identifier))
+ (identifier)
+ (identifier)))
+ (call_expression
+ (identifier)
+ (argument_list
+ (binary_expression
+ (identifier)
+ (literal
+ (integer)))))))