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

72 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 07:17:58 +00:00
Simple Remove
2023-11-11 01:44:03 +00:00
================================================================================
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
}
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
2023-10-19 01:50:45 +00:00
(root
2023-11-11 01:44:03 +00:00
(statement
(remove
(identifier)
(expression
(value
(list
(expression
(value
(integer)))
(expression
(value
(integer)))
(expression
(value
(integer))))))
(block
(statement
(expression
(logic
2023-10-31 13:31:10 +00:00
(expression
2023-11-11 01:44:03 +00:00
(identifier))
(logic_operator)
2023-10-31 13:31:10 +00:00
(expression
(value
2023-11-11 01:44:03 +00:00
(integer))))))))))
2023-10-19 01:50:45 +00:00
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-31 07:17:58 +00:00
Nested Remove
2023-11-11 01:44:03 +00:00
================================================================================
2023-10-19 01:50:45 +00:00
2023-10-31 17:04:22 +00:00
remove i from big_list {
2023-10-31 07:17:58 +00:00
remove j from i {
j != 42
}
2023-10-19 01:50:45 +00:00
}
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
2023-10-19 01:50:45 +00:00
(root
2023-11-11 01:44:03 +00:00
(statement
(remove
(identifier)
(expression
(identifier))
(block
(statement
(remove
(identifier)
(expression
(identifier))
(block
(statement
(expression
(logic
(expression
(identifier))
(logic_operator)
(expression
(value
(integer)))))))))))))