tree-sitter-cmake/corpus/quoted_argument.txt

177 lines
3.4 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
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument (quoted_argument))
)
)
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
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument (quoted_argument (quoted_element)))
)
)
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
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument (quoted_argument (quoted_element)))
(argument (quoted_argument (quoted_element)))
)
)
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
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument (quoted_argument (quoted_element)))
)
)
2021-06-07 17:29:32 -04:00
========================================
One variable reference [quoted_argument]
========================================
message("${var}")
---
(source_file
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
)
)
)
)
)
2021-06-07 17:29:32 -04:00
=========================================
2021-06-30 01:40:33 -04:00
Two Variable references [quoted_argument]
2021-06-07 17:29:32 -04:00
=========================================
message("${var} ${var}")
---
(source_file
(normal_command
(identifier)
2021-06-16 15:37:14 -04:00
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable)))
(variable_ref (normal_var (variable)))
)
)
)
)
)
2021-06-30 01:40:33 -04:00
======================================================================
Variable reference inside another variable reference [quoted_argument]
======================================================================
message("${var_${var}}")
---
(source_file
(normal_command
(identifier)
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable (variable_ref (normal_var (variable))))))
)
)
)
)
)
======================================================================
Lookalike bracket comment inside quoted argument [quoted_argument]
======================================================================
message("${var_${var}} #[[comment]]")
---
(source_file
(normal_command
(identifier)
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable (variable_ref (normal_var (variable))))))
)
)
)
)
)
======================================================================
Lookalike line comment inside quoted argument [quoted_argument]
======================================================================
message("${var_${var}} #comment")
---
(source_file
(normal_command
(identifier)
(argument
(quoted_argument
(quoted_element
(variable_ref (normal_var (variable (variable_ref (normal_var (variable))))))
)
)
)
)
)
===========================================================
Lookalike variable inside quoted argument [quoted_argument]
===========================================================
message("$var")
---
(source_file
(normal_command
(identifier)
(argument
(quoted_argument
(quoted_element)
)
)
)
)