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]
|
||||
pub struct AssertStmt {
|
||||
pub:
|
||||
pos token.Pos
|
||||
extra_pos token.Pos
|
||||
pub mut:
|
||||
expr Expr
|
||||
extra Expr
|
||||
expr Expr // `a == 0`
|
||||
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
|
||||
}
|
||||
|
||||
@ -1557,8 +1558,8 @@ pub struct IfGuardExpr {
|
||||
pub:
|
||||
vars []IfGuardVar
|
||||
pub mut:
|
||||
expr Expr
|
||||
expr_type Type
|
||||
expr Expr // `opt()`
|
||||
expr_type Type // type of `opt()`
|
||||
}
|
||||
|
||||
pub enum OrKind {
|
||||
|
Loading…
Reference in New Issue
Block a user