Files
tree-sitter-jhcl/test/corpus/function_calls.txt
Michael Hoffmann 9e3ec9848f feat: add namespaced identifiers
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
2024-06-24 03:58:23 +02:00

122 lines
3.3 KiB
Plaintext

================================================================================
nonary function call
================================================================================
foo = bar()
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier))))))
================================================================================
unary function call
================================================================================
foo = bar("foo")
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier)
(function_arguments
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))))))))
================================================================================
variadic function call
================================================================================
foo = bar(x...)
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier)
(function_arguments
(expression
(variable_expr
(identifier)))
(ellipsis)))))))
================================================================================
multiline function call
================================================================================
foo = bar(
"a",
"b",
"c"
)
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier)
(function_arguments
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))))))))
================================================================================
namespaced function call
================================================================================
foo = provider::time::rfc3339_parse("2023-07-25T23:43:16Z")
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier)
(function_arguments
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))))))))