mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: add comments for ast.AssertStmt and ast.IfGuardExpr (#17235)
This commit is contained in:
parent
7090e905f7
commit
e76e93d230
@ -1534,14 +1534,15 @@ pub const (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// `assert a == 0, 'a is zero'`
|
||||||
[minify]
|
[minify]
|
||||||
pub struct AssertStmt {
|
pub struct AssertStmt {
|
||||||
pub:
|
pub:
|
||||||
pos token.Pos
|
pos token.Pos
|
||||||
extra_pos token.Pos
|
extra_pos token.Pos
|
||||||
pub mut:
|
pub mut:
|
||||||
expr Expr
|
expr Expr // `a == 0`
|
||||||
extra Expr
|
extra Expr // `'a is zero'`
|
||||||
is_used bool // asserts are used in _test.v files, as well as in non -prod builds of all files
|
is_used bool // asserts are used in _test.v files, as well as in non -prod builds of all files
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1557,8 +1558,8 @@ pub struct IfGuardExpr {
|
|||||||
pub:
|
pub:
|
||||||
vars []IfGuardVar
|
vars []IfGuardVar
|
||||||
pub mut:
|
pub mut:
|
||||||
expr Expr
|
expr Expr // `opt()`
|
||||||
expr_type Type
|
expr_type Type // type of `opt()`
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum OrKind {
|
pub enum OrKind {
|
||||||
|
Loading…
Reference in New Issue
Block a user