aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--luxc/src/lux/compiler/host.clj2
-rw-r--r--luxc/src/lux/lexer.clj10
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