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

parser/ast: Block

This commit is contained in:
Alexander Medvednikov
2020-03-24 15:44:17 +01:00
parent 7aff0cb84f
commit e012966291
2 changed files with 12 additions and 1 deletions

View File

@@ -334,6 +334,12 @@ pub fn (p mut Parser) line_comment() ast.LineComment {
pub fn (p mut Parser) stmt() ast.Stmt {
match p.tok.kind {
.lcbr {
stmts := p.parse_block()
return ast.Block{
stmts: stmts
}
}
.key_assert {
p.next()
expr := p.expr(0)