tree-sitter-cmake/corpus/condition.txt

89 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-06-17 16:32:18 -04:00
====================
Empty if [condition]
====================
if(cond)
endif()
---
(source_file
(if_condition
(if_command
(if)
(argument (unquoted_argument))
)
(endif_command (endif))
)
)
===========================
Empty if elseif [condition]
===========================
if(cond)
elseif(cond)
endif()
---
(source_file
(if_condition
(if_command
(if)
(argument (unquoted_argument))
)
(elseif_command
(elseif)
(argument (unquoted_argument))
)
(endif_command (endif))
)
)
================================
Empty if elseif else [condition]
================================
if(cond)
elseif(cond)
else()
endif()
---
(source_file
(if_condition
(if_command
(if)
(argument (unquoted_argument))
)
(elseif_command
(elseif)
(argument (unquoted_argument))
)
(else_command (else))
(endif_command (endif))
)
)
==========================================
If with one command invocation [condition]
==========================================
if(cond)
message(STATUS)
endif()
---
(source_file
(if_condition
(if_command
(if)
(argument (unquoted_argument))
)
(normal_command
(identifier)
(argument (unquoted_argument))
2021-06-17 16:32:18 -04:00
)
(endif_command (endif))
)
2021-06-17 16:32:18 -04:00
)