aboutsummaryrefslogtreecommitdiff
path: root/calc.y
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-07-17 13:07:51 +0200
committerDimitri Sokolyuk <demon@dim13.org>2019-07-17 13:07:51 +0200
commitb766d2119ae0503e402f305fdf034ccafa4fdae9 (patch)
treee55729b4e28bcf62dc3c13b9131e059b5c7269bc /calc.y
parent237a7386150716889e2e4632bb3cbd614eb55d71 (diff)
cleanup
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
}