aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-03-23 01:00:24 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-03-23 01:00:24 +0100
commit39425b56c1cf0f4171e9d8c49d81368f9155c771 (patch)
tree5c7cfc591c7574f9f4e6b646312bee0fe59a038a
parenta0e24d60883ed46e46396a697e41c59cdbecc5cd (diff)
Switch to int64
-rw-r--r--lexer.go2
-rw-r--r--parser.y2
2 files changed, 2 insertions, 2 deletions
diff --git a/lexer.go b/lexer.go
index ec56ccc..c43ba94 100644
--- a/lexer.go
+++ b/lexer.go
@@ -33,7 +33,7 @@ func (y *yyLex) Lex(lval *yySymType) (ret int) {
lval.sval = strings.Replace(item.val, "''", "'", -1)
case INTEGER:
item.val = strings.Replace(item.val, "¯", "-", -1)
- lval.ival, _ = strconv.Atoi(item.val)
+ lval.ival, _ = strconv.ParseInt(item.val, 10, 64)
case FLOAT:
item.val = strings.Replace(item.val, "¯", "-", -1)
lval.fval, _ = strconv.ParseFloat(item.val, 64)
diff --git a/parser.y b/parser.y
index 1a59ea9..3d438e9 100644
--- a/parser.y
+++ b/parser.y
@@ -6,7 +6,7 @@ import "fmt"
%union {
sval string
- ival int
+ ival int64
fval float64
cval complex128
}