diff options
author | Eduardo Julian | 2018-07-28 14:55:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-28 14:55:30 -0400 |
commit | 15e71e57b688f5079fe606b2fee5e3efd2a5d5a7 (patch) | |
tree | b59e411ebc82a4fb4fdfe66efcc2817fc83c6188 /luxc/src | |
parent | dff8878c13610ae8d1207aaabefbecc88cd3911f (diff) |
Added "+" sign to positive Int.
Diffstat (limited to 'luxc/src')
-rw-r--r-- | luxc/src/lux/lexer.clj | 5 |
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+)) |