aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2018-07-28 15:39:06 -0400
committerEduardo Julian2018-07-28 15:39:06 -0400
commite6db62dbd6529938dace0e1cf5743f4e985efb81 (patch)
tree1117a8e1d45a109e0d982a3927ebff38e0aca17b /luxc
parent15e71e57b688f5079fe606b2fee5e3efd2a5d5a7 (diff)
Removed temporary "|" prefix on Nat.
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/lexer.clj2
-rw-r--r--luxc/src/lux/parser.clj2
2 files changed, 2 insertions, 2 deletions
diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj
index dbbfc3d2e..f74e14dfd 100644
--- a/luxc/src/lux/lexer.clj
+++ b/luxc/src/lux/lexer.clj
@@ -138,7 +138,7 @@
(|do [[meta _ token] (&reader/read-regex <regex>)]
(return (&/T [meta (<tag> (string/replace token #"_" ""))]))))
- lex-nat $Nat #"^\|[0-9][0-9_]*"
+ lex-nat $Nat #"^[0-9][0-9_]*"
lex-int $Int #"^(-|\+)[0-9][0-9_]*"
lex-rev $Rev #"^\.[0-9][0-9_]*"
lex-frac $Frac #"^(-|\+)[0-9][0-9_]*\.[0-9][0-9_]*((e|E)(-|\+)[0-9][0-9_]*)?"
diff --git a/luxc/src/lux/parser.clj b/luxc/src/lux/parser.clj
index 5303327c8..dd33129b8 100644
--- a/luxc/src/lux/parser.clj
+++ b/luxc/src/lux/parser.clj
@@ -68,7 +68,7 @@
(return (&/|list (&/T [meta (&/$Bit (.equals ^String ?value "#1"))])))
(&lexer/$Nat ?value)
- (return (&/|list (&/T [meta (&/$Nat (Long/parseUnsignedLong (.substring ^String ?value 1)))])))
+ (return (&/|list (&/T [meta (&/$Nat (Long/parseUnsignedLong ?value))])))
(&lexer/$Int ?value)
(return (&/|list (&/T [meta (&/$Int (Long/parseLong ?value))])))