Skip to content

Commit

Permalink
tests: Update operations test
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Sep 4, 2024
1 parent 24f86e4 commit 163ea71
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions test/corpus/operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Operations

420 + 69 # Basic binary operation
4 + 2 + 0 # Left associativity
4 + 2 * 0 # Operator precedence

---

Expand All @@ -16,7 +17,7 @@ Operations
(number)
)
)
(operator)
(additive_operator)
(expression
(literal
(number)
Expand All @@ -38,15 +39,15 @@ Operations
(number)
)
)
(operator)
(additive_operator)
(expression
(literal
(number)
)
)
)
)
(operator)
(additive_operator)
(expression
(literal
(number)
Expand All @@ -58,4 +59,34 @@ Operations
(statement
(comment)
)
(statement
(expression
(binary_expression
(expression
(literal
(number)
)
)
(additive_operator)
(expression
(binary_expression
(expression
(literal
(number)
)
)
(multiplicative_operator)
(expression
(literal
(number)
)
)
)
)
)
)
)
(statement
(comment)
)
)

0 comments on commit 163ea71

Please sign in to comment.