2023-10-31 19:21:13 +00:00
|
|
|
================================================================================
|
2023-10-18 21:52:56 +00:00
|
|
|
Simple For Loop
|
2023-10-31 19:21:13 +00:00
|
|
|
================================================================================
|
2023-10-18 21:52:56 +00:00
|
|
|
|
2023-10-31 19:21:13 +00:00
|
|
|
for i in [1, 2, 3] output i
|
2023-10-18 21:52:56 +00:00
|
|
|
|
2023-10-31 19:21:13 +00:00
|
|
|
--------------------------------------------------------------------------------
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
(root
|
2023-10-31 13:31:10 +00:00
|
|
|
(block
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
2023-10-31 13:31:10 +00:00
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))))
|
|
|
|
(block
|
|
|
|
(statement
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
2023-10-31 17:04:22 +00:00
|
|
|
(function_call
|
2023-10-31 19:21:13 +00:00
|
|
|
(built_in_function
|
|
|
|
(expression
|
|
|
|
(identifier)))))))))))
|
2023-10-18 21:52:56 +00:00
|
|
|
|
2023-10-31 19:21:13 +00:00
|
|
|
================================================================================
|
2023-10-31 05:09:29 +00:00
|
|
|
Nested For Loop
|
2023-10-31 19:21:13 +00:00
|
|
|
================================================================================
|
2023-10-18 21:52:56 +00:00
|
|
|
|
2023-10-31 19:21:13 +00:00
|
|
|
for list in list_of_lists for item in list output item
|
2023-10-18 21:52:56 +00:00
|
|
|
|
2023-10-31 19:21:13 +00:00
|
|
|
--------------------------------------------------------------------------------
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
(root
|
2023-10-31 13:31:10 +00:00
|
|
|
(block
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(block
|
2023-10-18 21:52:56 +00:00
|
|
|
(statement
|
2023-10-31 13:31:10 +00:00
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(block
|
|
|
|
(statement
|
|
|
|
(expression
|
2023-10-31 17:04:22 +00:00
|
|
|
(function_call
|
2023-10-31 19:21:13 +00:00
|
|
|
(built_in_function
|
|
|
|
(expression
|
|
|
|
(identifier))))))))))))))
|