Skip to content

Commit

Permalink
add precedence tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomocavalieri authored and lpil committed Oct 30, 2024
1 parent 6b2707d commit 1759008
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions test/corpus/echo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,49 @@ pub fn main() {
(list)
(pipeline_echo))
(integer))))

================================================================================
Echo precedence with pipes
================================================================================

pub fn main() {
echo 1 |> 2
3
}

--------------------------------------------------------------------------------

(source_file
(function
(visibility_modifier)
(identifier)
(function_parameters)
(function_body
(echo
(binary_expression
(integer)
(integer)))
(integer))))

================================================================================
Echo precedence with binop
================================================================================

pub fn main() {
echo 1 + 2
3
}

--------------------------------------------------------------------------------

(source_file
(function
(visibility_modifier)
(identifier)
(function_parameters)
(function_body
(echo
(binary_expression
(integer)
(integer)))
(integer))))

0 comments on commit 1759008

Please sign in to comment.