2023-10-31 15:21:13 -04:00
|
|
|
================================================================================
|
2023-10-18 17:52:56 -04:00
|
|
|
Transform Loop
|
2023-10-31 15:21:13 -04:00
|
|
|
================================================================================
|
2023-10-18 17:52:56 -04:00
|
|
|
|
|
|
|
transform i in [1, 2, 3] {
|
|
|
|
(output i)
|
|
|
|
}
|
|
|
|
|
2023-10-31 15:21:13 -04:00
|
|
|
--------------------------------------------------------------------------------
|
2023-10-18 17:52:56 -04:00
|
|
|
|
|
|
|
(root
|
2023-11-10 20:44:03 -05:00
|
|
|
(statement
|
|
|
|
(transform
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
2023-10-18 17:52:56 -04:00
|
|
|
(expression
|
2023-11-10 20:44:03 -05:00
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))))
|
|
|
|
(block
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(built_in_function
|
|
|
|
(expression
|
|
|
|
(identifier))))))))))
|
2023-10-18 17:52:56 -04:00
|
|
|
|
2023-10-31 15:21:13 -04:00
|
|
|
================================================================================
|
2023-10-31 05:51:37 -04:00
|
|
|
Nested Transform Loop
|
2023-10-31 15:21:13 -04:00
|
|
|
================================================================================
|
2023-10-18 17:52:56 -04:00
|
|
|
|
2023-10-31 05:51:37 -04:00
|
|
|
transform i in [['one'] ['two'] ['three']] {
|
|
|
|
transform j in i {
|
|
|
|
j += 'foobar'
|
|
|
|
}
|
2023-10-18 17:52:56 -04:00
|
|
|
}
|
|
|
|
|
2023-10-31 15:21:13 -04:00
|
|
|
--------------------------------------------------------------------------------
|
2023-10-18 17:52:56 -04:00
|
|
|
|
|
|
|
(root
|
2023-11-10 20:44:03 -05:00
|
|
|
(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
|
2023-10-31 09:31:10 -04:00
|
|
|
(expression
|
|
|
|
(value
|
2023-11-10 20:44:03 -05:00
|
|
|
(string)))))))))))))
|