mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
repl: functions and conditional blocks support
This commit is contained in:
parent
ecc8059a9e
commit
e1d2c83ff6
5 changed files with 178 additions and 64 deletions
11
compiler/tests/repl/function.repl
Normal file
11
compiler/tests/repl/function.repl
Normal file
|
@ -0,0 +1,11 @@
|
|||
fn test() {
|
||||
println('foo')
|
||||
}
|
||||
test()
|
||||
fn test2(a int) {
|
||||
println(a)
|
||||
}
|
||||
test2(42)
|
||||
===output===
|
||||
foo
|
||||
42
|
Loading…
Add table
Add a link
Reference in a new issue