Fixing op precedences

This commit is contained in:
Mike Farah
2021-02-11 10:58:40 +11:00
parent 9e56b364c2
commit 6efe4c4797
6 changed files with 41 additions and 28 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ func (p *expressionParserImpl) createExpressionTree(postFixPath []*Operation) (*
stack = append(stack, &newNode)
}
if len(stack) != 1 {
return nil, fmt.Errorf("expected end of expression but found '%v', please check expression syntax", strings.TrimSpace(stack[1].Operation.StringValue))
return nil, fmt.Errorf("Bad expression, please check expression syntax")
}
return stack[0], nil
}