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

fix fmt test

This commit is contained in:
Alexander Medvednikov 2020-02-22 17:07:03 +01:00
parent d510cd1e0d
commit dd29bfe4d2
2 changed files with 10 additions and 11 deletions

View File

@ -75,8 +75,7 @@ fn get_user() ?User {
}
fn get_user_ptr() &User {
return &User{
}
return &User{ }
}
struct Foo {

View File

@ -56,7 +56,7 @@ pub fn parse_stmt(text string, table &table.Table, scope &ast.Scope) ast.Stmt {
pref: &pref.Preferences{}
scope: scope
// scope: &ast.Scope{start_pos: 0, parent: 0}
}
p.init_parse_fns()
p.read_first_token()
@ -320,7 +320,7 @@ pub fn (p mut Parser) stmt() ast.Stmt {
return ast.ExprStmt{
expr: expr
// typ: typ
}
}
}
@ -1096,11 +1096,11 @@ fn (p mut Parser) if_expr() ast.Expr {
stmts: stmts
else_stmts: else_stmts
// typ: typ
pos: pos
has_else : has_else
has_else: has_else
// left: left
}
return node
}
@ -1302,7 +1302,7 @@ fn (p mut Parser) const_decl() ast.ConstDecl {
mut exprs := []ast.Expr
for p.tok.kind != .rpar {
name := p.prepend_mod(p.check_name())
// println('const: $name')
// println('!!const: $name')
p.check(.assign)
expr,typ := p.expr(0)
fields << ast.Field{
@ -1499,10 +1499,10 @@ fn (p mut Parser) var_decl() ast.VarDecl {
node := ast.VarDecl{
name: name
expr: expr // p.expr(token.lowest_prec)
is_mut: is_mut
// typ: typ
pos: p.tok.position()
}
p.scope.register_var(node)
@ -1621,7 +1621,7 @@ fn (p mut Parser) match_expr() ast.Expr {
blocks: blocks
match_exprs: match_exprs
// typ: typ
cond: cond
}
return node