Files
tree-sitter-jhcl/test/corpus/splat.txt

78 lines
1.8 KiB
Plaintext
Raw Normal View History

================================================================================
2021-06-11 23:32:22 +02:00
get attr
================================================================================
2021-06-11 23:32:22 +02:00
foo = bar.baz
--------------------------------------------------------------------------------
2021-06-11 23:32:22 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier))
(get_attr
(identifier))))))
2021-06-11 23:32:22 +02:00
================================================================================
2021-06-11 23:32:22 +02:00
get index
================================================================================
2021-06-11 23:32:22 +02:00
foo = bar[1]
--------------------------------------------------------------------------------
2021-06-11 23:32:22 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier))
(index
(expression
(literal_value
(numeric_lit))))))))
2021-06-11 23:32:22 +02:00
================================================================================
2021-06-11 23:32:22 +02:00
attr splat
================================================================================
2021-06-11 23:32:22 +02:00
foo = bar.*.foo
--------------------------------------------------------------------------------
2021-06-11 23:32:22 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier))
(splat
(attr_splat))
(get_attr
(identifier))))))
2021-06-11 23:32:22 +02:00
================================================================================
2021-06-11 23:32:22 +02:00
full splat
================================================================================
2021-06-11 23:32:22 +02:00
foo = bar[*].foo
--------------------------------------------------------------------------------
2021-06-11 23:32:22 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier))
(splat
(full_splat))
(get_attr
(identifier))))))