aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/firrtl-lexer.stanza
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/stanza/firrtl-lexer.stanza')
-rw-r--r--src/main/stanza/firrtl-lexer.stanza12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/stanza/firrtl-lexer.stanza b/src/main/stanza/firrtl-lexer.stanza
index f0673a72..8ee90f68 100644
--- a/src/main/stanza/firrtl-lexer.stanza
+++ b/src/main/stanza/firrtl-lexer.stanza
@@ -2,6 +2,7 @@ defpackage firrtl/lexer :
import core
import core/stringeater
import verse
+ import bigint
;=============== PUBLIC INTERFACE ===========================
public defn lex (text:String) -> List<Token> :
@@ -287,11 +288,12 @@ defn eat-number () :
(f:Float) : token-eaten(Token(f, info))
(f:False) : throw(InvalidNumber(info))
else :
- match(to-long(str)) :
- (l:Long) :
- if l < (to-long("2147483647") as Long) and l > (to-long("-2147483648") as Long) : token-eaten(Token(to-int(str), info))
- else : token-eaten(Token(l, info))
- (l:False) : token-eaten(Token(to-int(str), info))
+ token-eaten(Token(BigIntLit(str),info))
+ ;match(to-long(str)) :
+ ; (l:Long) :
+ ; if l < (to-long("2147483647") as Long) and l > (to-long("-2147483648") as Long) : token-eaten(Token(to-int(str), info))
+ ; else : token-eaten(Token(l, info))
+ ; (l:False) : token-eaten(Token(to-int(str), info))
;else : token-eaten(Token(to-int(str), info)) <- ADAM CHANGE, FROM THIS
defn eat-here-string () :