1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: workaround a vfmt limitation preventing formatting of vlib/v/ast/ast.v

This commit is contained in:
Delyan Angelov 2020-04-25 17:34:42 +03:00
parent 9a19531909
commit a20bef65ba

View File

@ -428,14 +428,9 @@ pub:
is_else bool
}
pub struct CompIf {
pub:
val string
stmts []Stmt
is_not bool
pos token.Position
mut:
/*
CompIf.is_opt:
`$if xyz? {}` => this compile time `if` is optional,
and .is_opt reflects the presence of ? at the end.
When .is_opt is true, the code should compile, even
@ -443,6 +438,14 @@ if `xyz` is NOT defined.
If .is_opt is false, then when `xyz` is not defined,
the compilation will fail.
*/
pub struct CompIf {
pub:
val string
stmts []Stmt
is_not bool
pos token.Position
mut:
is_opt bool
has_else bool
else_stmts []Stmt