aboutsummaryrefslogtreecommitdiff
path: root/calc.y
diff options
context:
space:
mode:
Diffstat (limited to 'calc.y')
-rw-r--r--calc.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/calc.y b/calc.y
index ca8ceaa..9f81d6c 100644
--- a/calc.y
+++ b/calc.y
@@ -40,7 +40,6 @@ line
| exp {
reg[last] = $1
yylex.(*yyLex).result = $1
- yylex.(*yyLex).ok = true
}
| WORD '=' exp { reg[$1] = $3 }
| error
@@ -68,8 +67,8 @@ func init() {
rand.Seed(time.Now().UnixNano())
}
-func Parse(input string) (float64, bool, error) {
+func Parse(input string) (float64, error) {
l := lex(input)
yyParse(l)
- return l.result, l.ok, l.err
+ return l.result, l.err
}