aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--luxc/src/lux/lexer.clj5
1 files changed, 2 insertions, 3 deletions
diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj
index 73bcb4f22..dbbfc3d2e 100644
--- a/luxc/src/lux/lexer.clj
+++ b/luxc/src/lux/lexer.clj
@@ -138,11 +138,10 @@
(|do [[meta _ token] (&reader/read-regex <regex>)]
(return (&/T [meta (<tag> (string/replace token #"_" ""))]))))
- ;; (-|\+)
lex-nat $Nat #"^\|[0-9][0-9_]*"
- lex-int $Int #"^-?[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_]*)?"
+ lex-frac $Frac #"^(-|\+)[0-9][0-9_]*\.[0-9][0-9_]*((e|E)(-|\+)[0-9][0-9_]*)?"
)
(def +same-module-mark+ (str &/+name-separator+ &/+name-separator+))