tree-sitter-cmake/corpus/quoted_argument.txt

124 lines
1.7 KiB
Plaintext
Raw Normal View History

2021-04-11 11:27:20 -04:00
=========================
One empty quoted argument
=========================
message("")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument (quoted_argument))
)
2021-04-11 11:27:20 -04:00
)
)
)
2021-04-11 11:27:20 -04:00
===================
One quoted argument
===================
message("An argument")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument (quoted_argument (quoted_element)))
)
2021-04-11 11:27:20 -04:00
)
)
)
2021-04-11 11:27:20 -04:00
====================
Two quoted arguments
====================
message("First argument" "Second argument")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument (quoted_argument (quoted_element)))
(seperation (space))
(argument (quoted_argument (quoted_element)))
)
2021-04-11 11:27:20 -04:00
)
)
)
2021-04-11 11:45:20 -04:00
=================================
A quoted argument with line break
=================================
message("An argument
with line break")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument (quoted_argument (quoted_element)))
)
2021-04-11 11:45:20 -04:00
)
)
)
======================
One variable reference
======================
message("${var}")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
)
)
)
)
)
)
)
=======================
Two Variable references
=======================
message("${var} ${var}")
---
(source_file
(command_invocation
(normal_command
(identifier)
(arguments
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
(variable_ref (normal_var (variable)))
)
)
)
)
)
)
)