tree-sitter-cmake/corpus/quoted_argument.txt

111 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-06-07 17:29:32 -04:00
===========================================
One empty quoted argument [quoted_argument]
===========================================
2021-04-11 11:27:20 -04:00
message("")
---
(source_file
2021-06-07 18:02:13 -04:00
(normal_command
(identifier)
(arguments
(argument (quoted_argument))
2021-04-11 11:27:20 -04:00
)
)
)
2021-04-11 11:27:20 -04:00
2021-06-07 17:29:32 -04:00
=====================================
One quoted argument [quoted_argument]
=====================================
2021-04-11 11:27:20 -04:00
message("An argument")
---
(source_file
2021-06-07 18:02:13 -04:00
(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
2021-06-07 17:29:32 -04:00
======================================
Two quoted arguments [quoted_argument]
======================================
2021-04-11 11:27:20 -04:00
message("First argument" "Second argument")
---
(source_file
2021-06-07 18:02:13 -04:00
(normal_command
(identifier)
(arguments
(argument (quoted_argument (quoted_element)))
(argument (quoted_argument (quoted_element)))
2021-04-11 11:27:20 -04:00
)
)
)
2021-04-11 11:45:20 -04:00
2021-06-07 17:29:32 -04:00
===================================================
A quoted argument with line break [quoted_argument]
===================================================
2021-04-11 11:45:20 -04:00
message("An argument
with line break")
---
(source_file
2021-06-07 18:02:13 -04:00
(normal_command
(identifier)
(arguments
(argument (quoted_argument (quoted_element)))
2021-04-11 11:45:20 -04:00
)
)
)
2021-06-07 17:29:32 -04:00
========================================
One variable reference [quoted_argument]
========================================
message("${var}")
---
(source_file
2021-06-07 18:02:13 -04:00
(normal_command
(identifier)
(arguments
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
)
)
)
)
)
)
2021-06-07 17:29:32 -04:00
=========================================
Two Variable references [quoted_argument]
=========================================
message("${var} ${var}")
---
(source_file
2021-06-07 18:02:13 -04:00
(normal_command
(identifier)
(arguments
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
(variable_ref (normal_var (variable)))
)
)
)
)
)
)