v2: remove test code from last commit in parser

pull/3931/head
Joe Conigliaro 2020-03-06 00:00:34 +11:00
parent 272eaaa704
commit 8ad8d03bc8
1 changed files with 0 additions and 13 deletions

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{}