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

v2: remove test code from last commit in parser

This commit is contained in:
Joe Conigliaro 2020-03-06 00:00:34 +11:00
parent 272eaaa704
commit 8ad8d03bc8

View File

@ -787,13 +787,6 @@ pub fn (p mut Parser) expr(precedence int) ast.Expr {
}
else if p.tok.kind.is_infix() {
node = p.infix_expr(node)
match node {
ast.PrefixExpr {
println('IS PREFIX')
return node
}
else {}
}
}
// Postfix
else if p.tok.kind in [.inc, .dec] {
@ -932,12 +925,6 @@ fn (p mut Parser) infix_expr(left ast.Expr) ast.Expr {
precedence := p.tok.precedence()
pos := p.tok.position()
p.next()
if op == .mul && p.peek_tok.kind in [.assign, .decl_assign] {
return ast.PrefixExpr{
op: op
right: p.expr(0)
}
}
mut right := ast.Expr{}
right = p.expr(precedence)
mut expr := ast.Expr{}