mirror of https://github.com/Wilfred/difftastic/
add echo
parent
57c9951b29
commit
8db8a0ba8b
@ -0,0 +1,66 @@
|
||||
================================================================================
|
||||
Echo with expression
|
||||
================================================================================
|
||||
|
||||
pub fn main() {
|
||||
echo 1
|
||||
}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(function
|
||||
(visibility_modifier)
|
||||
(identifier)
|
||||
(function_parameters)
|
||||
(function_body
|
||||
(echo
|
||||
(integer)))))
|
||||
|
||||
================================================================================
|
||||
Echo in pipeline
|
||||
================================================================================
|
||||
|
||||
pub fn main() {
|
||||
[]
|
||||
|> echo
|
||||
|> panic
|
||||
}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(function
|
||||
(visibility_modifier)
|
||||
(identifier)
|
||||
(function_parameters)
|
||||
(function_body
|
||||
(binary_expression
|
||||
(binary_expression
|
||||
(list)
|
||||
(pipeline_echo))
|
||||
(panic)))))
|
||||
|
||||
================================================================================
|
||||
Echo last in pipeline
|
||||
================================================================================
|
||||
|
||||
pub fn main() {
|
||||
[]
|
||||
|> echo
|
||||
|
||||
1
|
||||
}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(function
|
||||
(visibility_modifier)
|
||||
(identifier)
|
||||
(function_parameters)
|
||||
(function_body
|
||||
(binary_expression
|
||||
(list)
|
||||
(pipeline_echo))
|
||||
(integer))))
|
||||
Loading…
Reference in New Issue