diff options
author | Eduardo Julian | 2016-12-25 19:51:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-12-25 19:51:08 -0400 |
commit | 2eeb6682e3db5aaba550ebc58a6e1322430c5b17 (patch) | |
tree | f68779e2450ef3451e7627a47a7c39a248e297c5 /luxc/src | |
parent | 364a08a67925c42e987ffaf6a3471680b7b82d10 (diff) |
- Now, only using underscores (_) as number digit separators, without using commas (,).
Diffstat (limited to 'luxc/src')
-rw-r--r-- | luxc/src/lux/compiler/host.clj | 2 | ||||
-rw-r--r-- | luxc/src/lux/lexer.clj | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/luxc/src/lux/compiler/host.clj b/luxc/src/lux/compiler/host.clj index ceaa35755..4c2ff9d24 100644 --- a/luxc/src/lux/compiler/host.clj +++ b/luxc/src/lux/compiler/host.clj @@ -1722,7 +1722,7 @@ _ (doto (.visitMethod =class (+ Opcodes/ACC_PUBLIC Opcodes/ACC_STATIC) "clean_separators" "(Ljava/lang/String;)Ljava/lang/String;" nil nil) (.visitCode) (.visitVarInsn Opcodes/ALOAD 0) - (.visitLdcInsn ",|_") + (.visitLdcInsn "_") (.visitLdcInsn "") (.visitMethodInsn Opcodes/INVOKEVIRTUAL "java/lang/String" "replaceAll" "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;") (.visitInsn Opcodes/ARETURN) diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj index f519aa563..819c130f0 100644 --- a/luxc/src/lux/lexer.clj +++ b/luxc/src/lux/lexer.clj @@ -164,12 +164,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|[1-9][0-9,_]*)" - lex-int $Int #"^-?(0|[1-9][0-9,_]*)" - lex-frac $Frac #"^(\.[0-9,_]+)" - lex-real $Real #"^-?(0\.[0-9,_]+|[1-9][0-9,_]*\.[0-9,_]+)(e-?[1-9][0-9,_]*)?" + lex-nat $Nat #"^\+(0|[1-9][0-9_]*)" + lex-int $Int #"^-?(0|[1-9][0-9_]*)" + lex-frac $Frac #"^(\.[0-9_]+)" + lex-real $Real #"^-?(0\.[0-9_]+|[1-9][0-9_]*\.[0-9_]+)(e-?[1-9][0-9_]*)?" ) (def lex-char |