summaryrefslogtreecommitdiffstats
path: root/vendored_parsers/tree-sitter-cmake/test/corpus/while.txt
diff options
context:
space:
mode:
Diffstat (limited to 'vendored_parsers/tree-sitter-cmake/test/corpus/while.txt')
-rw-r--r--vendored_parsers/tree-sitter-cmake/test/corpus/while.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/vendored_parsers/tree-sitter-cmake/test/corpus/while.txt b/vendored_parsers/tree-sitter-cmake/test/corpus/while.txt
new file mode 100644
index 000000000..2f283d839
--- /dev/null
+++ b/vendored_parsers/tree-sitter-cmake/test/corpus/while.txt
@@ -0,0 +1,47 @@
+===================
+Empty while [while]
+===================
+
+while(cond)
+endwhile()
+
+---
+
+(source_file
+ (while_loop
+ (while_command
+ (while)
+ (argument_list
+ (argument (unquoted_argument))
+ )
+ )
+ (body)
+ (endwhile_command (endwhile))
+ )
+)
+
+============================================
+Empty while with argument in endwhile[while]
+============================================
+
+while(cond)
+endwhile(cond)
+
+---
+
+(source_file
+ (while_loop
+ (while_command
+ (while)
+ (argument_list
+ (argument (unquoted_argument))
+ )
+ )
+ (body)
+ (endwhile_command
+ (endwhile)
+ (argument (unquoted_argument))
+ )
+ )
+)
+