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

parser: a minor simplification

This commit is contained in:
Alexander Medvednikov 2020-05-18 17:02:29 +02:00
parent 90270d8791
commit fc900baf9e

View File

@ -93,10 +93,7 @@ pub fn parse_file(path string, b_table &table.Table, comments_mode scanner.Comme
// comments_mode: comments_mode
p.read_first_token()
for p.tok.kind == .comment {
mut stmt := ast.Stmt{} // TODO sum type << bug
com := p.comment()
stmt = com
stmts << stmt
stmts << p.comment()
}
// module
mut mstmt := ast.Stmt{}