2023-10-18 21:52:56 +00:00
|
|
|
==================
|
|
|
|
Simple For Loop
|
|
|
|
==================
|
|
|
|
|
|
|
|
for i in [1, 2, 3] {
|
|
|
|
(output i)
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
2023-10-21 17:19:01 +00:00
|
|
|
(tool
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))))))))
|
|
|
|
|
|
|
|
==================
|
|
|
|
Complex For Loop
|
|
|
|
==================
|
|
|
|
|
|
|
|
for list in list_of_lists {
|
|
|
|
for item in list {
|
|
|
|
(output item)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (length list) > 1 {
|
|
|
|
(output "List is long...")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
2023-10-21 17:19:01 +00:00
|
|
|
(tool
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))))))
|
|
|
|
(statement
|
|
|
|
(if_else
|
|
|
|
(if
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
2023-10-21 17:19:01 +00:00
|
|
|
(tool
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))
|
|
|
|
(statement
|
|
|
|
(expression
|
2023-10-21 17:19:01 +00:00
|
|
|
(tool
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string))))))))))))))
|
2023-10-28 14:28:43 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Async For Loop
|
|
|
|
==================
|
|
|
|
|
|
|
|
asnyc for list in list_of_lists {
|
|
|
|
async for item in list {
|
|
|
|
(output item)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(identifier))))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(tool
|
|
|
|
(expression
|
|
|
|
(identifier)))))))))))))
|