diff options
author | The Lux Programming Language | 2018-07-28 15:52:36 -0400 |
---|---|---|
committer | GitHub | 2018-07-28 15:52:36 -0400 |
commit | 072849be197dc6bb6007d08bb26be00cc374c744 (patch) | |
tree | 522a5ef5077eb4cf10e083a9feec042476626f7b /luxc/src | |
parent | b14102eaa2a80f51f160ba293ec01928dbe683c3 (diff) | |
parent | 168d36d07b48d2d936de24aa69b8464e68992075 (diff) |
Merge pull request #46 from LuxLang/change-number-signs
Change number signs
Diffstat (limited to 'luxc/src')
-rw-r--r-- | luxc/src/lux/lexer.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj index 354bf98e2..f74e14dfd 100644 --- a/luxc/src/lux/lexer.clj +++ b/luxc/src/lux/lexer.clj @@ -130,7 +130,7 @@ (|do [[meta _ token] (&reader/read-regex <regex>)] (return (&/T [meta (<tag> token)])))) - lex-bit $Bit #"^(#0|#1)" + lex-bit $Bit #"^#(0|1)" ) (do-template [<name> <tag> <regex>] @@ -138,10 +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-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_]+((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+)) |