Skip to content

Commit

Permalink
tests: Unary operator test
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 1, 2024
1 parent 13036fc commit 3109c7b
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions test/corpus/unary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
===
Unary operators
===

-420
1 + -2
0 - 5

---

(source_file
(statement
(expression
(unary_expression
operator: (unary_operator)
expression: (expression
(literal
(number)
)
)
)
)
)
(statement
(expression
(binary_expression
left: (expression
(literal
(number)
)
)
operator: (additive_operator)
right: (expression
(unary_expression
operator: (unary_operator)
expression: (expression
(literal
(number)
)
)
)
)
)
)
)
(statement
(expression
(binary_expression
left: (expression
(literal
(number)
)
)
operator: (additive_operator)
right: (expression
(literal
(number)
)
)
)
)
)
)

0 comments on commit 3109c7b

Please sign in to comment.