Files
tree-sitter-jhcl/test/corpus/function_calls.txt
mhoffm 380571cc1a * add field names to object elements
* dont hide template interpolation start/end and quoted template start/end tokens
2021-07-02 08:34:28 +02:00

99 lines
2.6 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))))))))))