Detect and fail on missing closing brackets #1366

This commit is contained in:
Mike Farah
2022-10-08 12:44:54 +11:00
parent 48c36efe07
commit 1b8d399de4
3 changed files with 25 additions and 12 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("Bad expression, please check expression syntax")
return nil, fmt.Errorf("bad expression, please check expression syntax")
}
return stack[0], nil
}