1
0
dust/tree-sitter-dust/corpus/transform.txt
2023-10-31 13:04:22 -04:00

89 lines
1.9 KiB
Plaintext

==================
Transform Loop
==================
transform i in [1, 2, 3] {
(output i)
}
---
(root
(block
(statement
(transform
(identifier)
(expression
(value
(list
(expression
(value
(integer)))
(expression
(value
(integer)))
(expression
(value
(integer))))))
(block
(statement
(expression
(function_call
(built_in_function)
(expression
(identifier))))))))))
==================
Nested Transform Loop
==================
transform i in [['one'] ['two'] ['three']] {
transform j in i {
j += 'foobar'
}
}
---
(root
(block
(statement
(transform
(identifier)
(expression
(value
(list
(expression
(value
(list
(expression
(value
(string))))))
(expression
(value
(list
(expression
(value
(string))))))
(expression
(value
(list
(expression
(value
(string)))))))))
(block
(statement
(transform
(identifier)
(expression
(identifier))
(block
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(expression
(value
(string))))))))))))))