add precedence tests

pull/844/head
Giacomo Cavalieri 2024-10-30 09:08:15 +07:00 committed by Louis Pilfold
parent 6b2707d97c
commit 17590082db
1 changed files with 46 additions and 0 deletions

@ -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))))