difftastic/vendored_parsers/tree-sitter-hack/test/cases/statements/foreach.exp

34 lines
759 B
Plaintext

(script
(foreach_statement
collection: (variable)
value: (variable)
body: (compound_statement))
(foreach_statement
collection: (array
(array_type))
key: (variable)
value: (subscript_expression
(variable)
(integer))
body: (compound_statement))
(foreach_statement
collection: (array
(array_type)
(type_arguments
(type_specifier)
(type_specifier)))
value: (list_expression
(subscript_expression
(variable)
(subscript_expression
(as_expression
left: (array
(array_type))
right: (type_specifier))
(integer)))
(variable))
body: (compound_statement))
(comment)
(comment)
(comment))