aboutsummaryrefslogtreecommitdiff
path: root/luxc/src
diff options
context:
space:
mode:
authorEduardo Julian2018-07-14 02:59:41 -0400
committerEduardo Julian2018-07-14 02:59:41 -0400
commit0c0472862f5c1e543e6c5614a4cd112ac7d4cc13 (patch)
treea94c7cd4bf3c916296c5341c5fc043ca71acb184 /luxc/src
parent69fefab57c40f323d759dc444dbcebad15071585 (diff)
- New syntax for bit values: "#0" and "#1", instead of "false" and "true".
- Small improvements to lux-mode.
Diffstat (limited to 'luxc/src')
-rw-r--r--luxc/src/lux/lexer.clj2
-rw-r--r--luxc/src/lux/parser.clj2
2 files changed, 2 insertions, 2 deletions
diff --git a/luxc/src/lux/lexer.clj b/luxc/src/lux/lexer.clj
index be8f8b69a..aac212e26 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 #"^(true|false)"
+ lex-bit $Bit #"^(#0|#1)"
)
(do-template [<name> <tag> <regex>]
diff --git a/luxc/src/lux/parser.clj b/luxc/src/lux/parser.clj
index 92a23da81..7a58059b0 100644
--- a/luxc/src/lux/parser.clj
+++ b/luxc/src/lux/parser.clj
@@ -65,7 +65,7 @@
(return &/$Nil)
(&lexer/$Bit ?value)
- (return (&/|list (&/T [meta (&/$Bit (Boolean/parseBoolean ?value))])))
+ (return (&/|list (&/T [meta (&/$Bit (.equals ^String ?value "#1"))])))
(&lexer/$Nat ?value)
(return (&/|list (&/T [meta (&/$Nat (Long/parseUnsignedLong ?value))])))