more tests; add function expressions
This commit is contained in:
86
test/corpus/splat.txt
Normal file
86
test/corpus/splat.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
==================
|
||||
get attr
|
||||
==================
|
||||
|
||||
foo = bar.baz
|
||||
|
||||
---
|
||||
|
||||
(config_file
|
||||
(body
|
||||
(attribute
|
||||
(identifier)
|
||||
(expression
|
||||
(expr_term
|
||||
(expr_term
|
||||
(variable_expr
|
||||
(identifier)))
|
||||
(get_attr
|
||||
(identifier)))))))
|
||||
|
||||
==================
|
||||
get index
|
||||
==================
|
||||
|
||||
foo = bar[1]
|
||||
|
||||
---
|
||||
|
||||
(config_file
|
||||
(body
|
||||
(attribute
|
||||
(identifier)
|
||||
(expression
|
||||
(expr_term
|
||||
(expr_term
|
||||
(variable_expr
|
||||
(identifier)))
|
||||
(index
|
||||
(expression
|
||||
(expr_term
|
||||
(literal_value
|
||||
(numeric_lit))))))))))
|
||||
|
||||
==================
|
||||
attr splat
|
||||
==================
|
||||
|
||||
foo = bar.*.foo
|
||||
|
||||
---
|
||||
|
||||
(config_file
|
||||
(body
|
||||
(attribute
|
||||
(identifier)
|
||||
(expression
|
||||
(expr_term
|
||||
(expr_term
|
||||
(variable_expr
|
||||
(identifier)))
|
||||
(splat
|
||||
(attr_splat
|
||||
(get_attr
|
||||
(identifier)))))))))
|
||||
|
||||
==================
|
||||
full splat
|
||||
==================
|
||||
|
||||
foo = bar[*].foo
|
||||
|
||||
---
|
||||
|
||||
(config_file
|
||||
(body
|
||||
(attribute
|
||||
(identifier)
|
||||
(expression
|
||||
(expr_term
|
||||
(expr_term
|
||||
(variable_expr
|
||||
(identifier)))
|
||||
(splat
|
||||
(full_splat
|
||||
(get_attr
|
||||
(identifier)))))))))
|
||||
Reference in New Issue
Block a user