From 0c0472862f5c1e543e6c5614a4cd112ac7d4cc13 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 14 Jul 2018 02:59:41 -0400 Subject: - New syntax for bit values: "#0" and "#1", instead of "false" and "true". - Small improvements to lux-mode. --- luxc/src/lux/lexer.clj | 2 +- luxc/src/lux/parser.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'luxc/src') 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 )] (return (&/T [meta ( token)])))) - lex-bit $Bit #"^(true|false)" + lex-bit $Bit #"^(#0|#1)" ) (do-template [ ] 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))]))) -- cgit v1.2.3