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

cgen: fix several errors

This commit is contained in:
Alexander Medvednikov
2020-03-06 16:31:40 +01:00
parent ed9075b937
commit be2480c320
5 changed files with 11 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ pub fn (p mut Parser) call_expr(is_c bool, mod string) ast.CallExpr {
args: args
muts: muts
// tok: tok
pos: tok.position()
is_c: is_c
or_block: ast.OrExpr{
@@ -155,6 +155,7 @@ fn (p mut Parser) fn_decl() ast.FnDecl {
})
}
mut stmts := []ast.Stmt
no_body := p.tok.kind != .lcbr
if p.tok.kind == .lcbr {
stmts = p.parse_block()
}
@@ -175,6 +176,7 @@ fn (p mut Parser) fn_decl() ast.FnDecl {
is_method: is_method
rec_mut: rec_mut
is_c: is_c
no_body: no_body
}
}

View File

@@ -1593,6 +1593,7 @@ fn (p mut Parser) global_decl() ast.GlobalDecl {
return ast.GlobalDecl{
name: name
typ: typ
}
}