1
0
dust/tree-sitter-dust/corpus/remove.txt

73 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-10-19 01:50:45 +00:00
==================
2023-10-31 07:17:58 +00:00
Simple Remove
2023-10-19 01:50:45 +00:00
==================
2023-10-31 05:09:29 +00:00
remove i from [1, 2, 3] {
2023-10-19 01:50:45 +00:00
i <= 2
}
---
(root
2023-10-31 07:17:58 +00:00
(statement
(remove
(identifier)
(expression
(value
(list
(expression
(value
(integer)))
(expression
(value
(integer)))
(expression
(value
(integer))))))
(statement
2023-10-19 01:50:45 +00:00
(expression
2023-10-31 07:17:58 +00:00
(logic
2023-10-19 01:50:45 +00:00
(expression
2023-10-31 07:17:58 +00:00
(identifier))
(logic_operator)
(expression
(value
(integer)))))))))
2023-10-19 01:50:45 +00:00
==================
2023-10-31 07:17:58 +00:00
Nested Remove
2023-10-19 01:50:45 +00:00
==================
2023-10-31 07:17:58 +00:00
removed = remove i from big_list {
remove j from i {
j != 42
}
2023-10-19 01:50:45 +00:00
}
---
(root
2023-10-31 07:17:58 +00:00
(statement
(assignment
(identifier)
(assignment_operator)
(statement
(remove
(identifier)
(expression
(identifier))
(statement
(remove
(identifier)
(expression
(identifier))
2023-10-19 01:50:45 +00:00
(statement
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
2023-10-31 07:17:58 +00:00
(integer)))))))))))))