diff --git a/parser.go b/parser.go index d3988c3..5656139 100644 --- a/parser.go +++ b/parser.go @@ -236,7 +236,7 @@ func (p *Parser) parseExpr() (Expr, error) { } // Assign the new root based on the precendence of the LHS and RHS operators. - if lhs, ok := expr.(*BinaryExpr); ok && lhs.Op.Precedence() <= op.Precedence() { + if lhs, ok := expr.(*BinaryExpr); ok && lhs.Op.Precedence() < op.Precedence() { expr = &BinaryExpr{ LHS: lhs.LHS, RHS: &BinaryExpr{LHS: lhs.RHS, RHS: rhs, Op: op},