diff --git a/parser.go b/parser.go index d0478a2..ac46991 100644 --- a/parser.go +++ b/parser.go @@ -615,7 +615,7 @@ func (p *Parser) tryUnaryExpression() (*Expression, error) { } } - return nil, nil + return p.tryPrimaryExpression() } func (p *Parser) tryBinaryExpression0(opFunc func() (*Expression, error), operators ...Operator) (*Expression, error) { @@ -652,7 +652,7 @@ func (p *Parser) tryBinaryExpression0(opFunc func() (*Expression, error), operat } func (p *Parser) tryMultiplicativeExpression() (*Expression, error) { - return p.tryBinaryExpression0(p.tryPrimaryExpression, Operator_Multiply, Operator_Divide, Operator_Modulo) + return p.tryBinaryExpression0(p.tryUnaryExpression, Operator_Multiply, Operator_Divide, Operator_Modulo) } func (p *Parser) tryAdditiveExpression() (*Expression, error) {