aboutsummaryrefslogtreecommitdiff
path: root/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.go')
-rw-r--r--lexer.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/lexer.go b/lexer.go
index 329d97e..9bacf67 100644
--- a/lexer.go
+++ b/lexer.go
@@ -36,23 +36,23 @@ func (y *yyLex) Lex(lval *yySymType) int {
item := <-y.items
switch item.typ {
case STRING:
- lval.sval = S(item.val)
+ lval.sval = item.val
case QUOTED:
- lval.sval = S(dequote(item.val))
+ lval.sval = dequote(item.val)
case INTEGER:
item.val = deneg(item.val)
v, err := strconv.ParseInt(item.val, 10, 64)
if err != nil {
y.Error(err.Error())
}
- lval.ival = I(v)
+ lval.ival = v
case FLOAT:
item.val = deneg(item.val)
v, err := strconv.ParseFloat(item.val, 64)
if err != nil {
y.Error(err.Error())
}
- lval.fval = F(v)
+ lval.fval = v
case COMPLEX:
item.val = deneg(item.val)
pos := strings.IndexAny(item.val, "jJ")
@@ -67,7 +67,7 @@ func (y *yyLex) Lex(lval *yySymType) int {
if err != nil {
y.Error(err.Error())
}
- lval.cval = C(complex(r, i))
+ lval.cval = complex(r, i)
}
return item.typ
}