mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +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
18
compiler/tests/repl/conditional_blocks.repl
Normal file
18
compiler/tests/repl/conditional_blocks.repl
Normal file
|
@ -0,0 +1,18 @@
|
|||
if true {
|
||||
println('foo')
|
||||
}
|
||||
for i := 0; i < 4; i++ {
|
||||
println(i)
|
||||
}
|
||||
if false {
|
||||
println('foo')
|
||||
} else {
|
||||
println('bar')
|
||||
}
|
||||
===output===
|
||||
foo
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
bar
|
Loading…
Add table
Add a link
Reference in a new issue