mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: process TypeOf node
This commit is contained in:
parent
87a185ea9c
commit
4cde6c0865
@ -592,6 +592,11 @@ fn (f mut Fmt) expr(node ast.Expr) {
|
||||
f.write('}')
|
||||
}
|
||||
}
|
||||
ast.TypeOf {
|
||||
f.write('typeof(')
|
||||
f.expr(it.expr)
|
||||
f.write(')')
|
||||
}
|
||||
else {
|
||||
eprintln('fmt expr: unhandled node ' + typeof(node))
|
||||
}
|
||||
|
3
vlib/v/fmt/tests/typeof_keep.vv
Normal file
3
vlib/v/fmt/tests/typeof_keep.vv
Normal file
@ -0,0 +1,3 @@
|
||||
fn test_typeof() {
|
||||
println(typeof(x))
|
||||
}
|
Loading…
Reference in New Issue
Block a user