tree-sitter-cmake/test/corpus/foreach.txt

137 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2021-06-07 18:17:10 -04:00
==================================
2021-06-14 16:12:45 -04:00
Empty foreach loop [foreach]
2021-06-07 18:17:10 -04:00
==================================
2021-06-06 14:38:18 -04:00
foreach(var)
endforeach()
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
)
)
(body)
(endforeach_command (endforeach))
2021-06-07 18:07:49 -04:00
)
)
2021-06-06 14:38:18 -04:00
2021-06-07 18:17:10 -04:00
===============================================================
2021-06-14 16:12:45 -04:00
Empty foreach loop with one argument endforeach [foreach]
2021-06-07 18:17:10 -04:00
===============================================================
2021-06-06 14:38:18 -04:00
foreach(var)
endforeach(var)
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
)
)
(body)
(endforeach_command
(endforeach)
(argument (unquoted_argument))
)
2021-06-07 18:07:49 -04:00
)
)
2021-06-07 17:02:35 -04:00
2021-06-07 18:17:10 -04:00
=================================
2021-06-14 16:12:45 -04:00
Uppercase foreach [foreach]
2021-06-07 18:17:10 -04:00
=================================
2021-06-07 17:02:35 -04:00
FOREACH(var)
ENDFOREACH()
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
)
)
(body)
(endforeach_command (endforeach))
2021-06-07 18:07:49 -04:00
)
)
2021-06-07 17:02:35 -04:00
2021-06-07 18:17:10 -04:00
==================================
2021-06-14 16:12:45 -04:00
Mixed case foreach [foreach]
2021-06-07 18:17:10 -04:00
==================================
2021-06-07 17:02:35 -04:00
forEach(var)
endForEach()
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
)
)
(body)
(endforeach_command (endforeach))
2021-06-07 18:07:49 -04:00
)
)
2021-06-14 16:12:45 -04:00
==================================
Empty IN [foreach]
==================================
foreach(var IN)
endforeach()
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
(argument (unquoted_argument))
)
)
(body)
(endforeach_command (endforeach))
2021-06-14 16:12:45 -04:00
)
)
2021-06-14 16:12:45 -04:00
==================================
Empty RANGE [foreach]
==================================
foreach(var RANGE)
endforeach()
---
(source_file
(foreach_loop
(foreach_command
(foreach)
(argument_list
(argument (unquoted_argument))
(argument (unquoted_argument))
)
)
(body)
(endforeach_command (endforeach))
2021-06-14 16:12:45 -04:00
)
)