aboutsummaryrefslogtreecommitdiff
path: root/luxc/src
diff options
context:
space:
mode:
authorEduardo Julian2019-03-13 21:14:22 -0400
committerEduardo Julian2019-03-13 21:14:22 -0400
commit8e4b93bfc90ca81d615bf9dd5af43f29fdd0f5ae (patch)
tree0b343949908c11f8f27d70e4d40b1ccd0f969add /luxc/src
parent810c2c9f524603c161f265e4ed17c6556bdef959 (diff)
Replaced the digit separator in numbers from "_" to ",".
Diffstat (limited to 'luxc/src')
-rw-r--r--luxc/src/lux/lexer.clj10
1 files changed, 5 insertions, 5 deletions
diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj
index 8ed75b940..962e1e9bd 100644
--- a/luxc/src/lux/lexer.clj
+++ b/luxc/src/lux/lexer.clj
@@ -57,12 +57,12 @@
(do-template [<name> <tag> <regex>]
(def <name>
(|do [[meta _ token] (&reader/read-regex <regex>)]
- (return (&/T [meta (<tag> (string/replace token #"_" ""))]))))
+ (return (&/T [meta (<tag> (string/replace token #"," ""))]))))
- 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_]*)?"
+ 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,]*)?"
)
(def +same-module-mark+ (str &/+name-separator+ &/+name-separator+))