From a9f6cfb6a8b6d38057faca067c015da1f72cf62d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 5 Oct 2026 00:26:05 +0200 Subject: Add a treesitter grammar --- .../test/corpus/const_element_array.txt | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tools/tree-sitter/test/corpus/const_element_array.txt (limited to 'tools/tree-sitter/test/corpus/const_element_array.txt') diff --git a/tools/tree-sitter/test/corpus/const_element_array.txt b/tools/tree-sitter/test/corpus/const_element_array.txt new file mode 100644 index 0000000..e43c2f1 --- /dev/null +++ b/tools/tree-sitter/test/corpus/const_element_array.txt @@ -0,0 +1,47 @@ +================== +const_element_array +================== + +module + +type + CI = const Int + +var + a: [3]CI := [1, 2, 3] + b: [3]CI + +end. + +--- + +(source_file + (module_declaration + (type_section + (type_declaration + (identifier_definition + (identifier)) + (const_type + (identifier)))) + (var_section + (variable_declaration + (identifier_definition + (identifier)) + (array_type + (literal + (integer)) + (identifier)) + (array_constructor + (literal + (integer)) + (literal + (integer)) + (literal + (integer)))) + (variable_declaration + (identifier_definition + (identifier)) + (array_type + (literal + (integer)) + (identifier)))))) -- cgit v1.2.3