summaryrefslogtreecommitdiff
path: root/calc.go
diff options
context:
space:
mode:
Diffstat (limited to 'calc.go')
-rw-r--r--calc.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/calc.go b/calc.go
index ab205ce..c3b8bf9 100644
--- a/calc.go
+++ b/calc.go
@@ -809,6 +809,17 @@ func (f *File) evalInfixExp(sheet, cell string, tokens []efp.Token) (efp.Token,
}
}
+ if isEndParenthesesToken(token) && isBeginParenthesesToken(opftStack.Peek().(efp.Token)) {
+ if arg := argsStack.Peek().(*list.List).Back(); arg != nil {
+ opfdStack.Push(efp.Token{
+ TType: efp.TokenTypeOperand,
+ TSubType: efp.TokenSubTypeNumber,
+ TValue: arg.Value.(formulaArg).Value(),
+ })
+ argsStack.Peek().(*list.List).Remove(arg)
+ }
+ }
+
// check current token is opft
if err = f.parseToken(sheet, token, opfdStack, opftStack); err != nil {
return efp.Token{}, err