83 lines
1.6 KiB
Plaintext
83 lines
1.6 KiB
Plaintext
==================
|
|
Transform Loop
|
|
==================
|
|
|
|
transform i in [1, 2, 3] {
|
|
(output i)
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(statement
|
|
(transform
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(integer)))
|
|
(expression
|
|
(value
|
|
(integer)))
|
|
(expression
|
|
(value
|
|
(integer))))))
|
|
(statement
|
|
(expression
|
|
(tool
|
|
(expression
|
|
(identifier))))))))
|
|
|
|
==================
|
|
Nested Transform Loop
|
|
==================
|
|
|
|
transform i in [['one'] ['two'] ['three']] {
|
|
transform j in i {
|
|
j += 'foobar'
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(statement
|
|
(transform
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string))))))
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string))))))
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))))))))
|
|
(statement
|
|
(transform
|
|
(identifier)
|
|
(expression
|
|
(identifier))
|
|
(statement
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(string)))))))))))
|