diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/compiler/default/syntax.lux | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/stdlib/source/lux/compiler/default/syntax.lux b/stdlib/source/lux/compiler/default/syntax.lux index dc22de5d0..faa072d88 100644 --- a/stdlib/source/lux/compiler/default/syntax.lux +++ b/stdlib/source/lux/compiler/default/syntax.lux @@ -62,25 +62,25 @@ (def: new-line "\n") ## (def: new-line^ (l.this new-line)) -(def: text-delimiter "\"") +(def: #export text-delimiter text.double-quote) ## (def: text-delimiter^ (l.this text-delimiter)) -(def: open-form "(") -(def: close-form ")") +(def: #export open-form "(") +(def: #export close-form ")") -(def: open-tuple "[") -(def: close-tuple "]") +(def: #export open-tuple "[") +(def: #export close-tuple "]") -(def: open-record "{") -(def: close-record "}") +(def: #export open-record "{") +(def: #export close-record "}") (def: escape "\\") -(def: sigil "#") +(def: #export sigil "#") -(def: digit-separator "_") +(def: #export digit-separator "_") -(def: single-line-comment-marker (format ..sigil ..sigil)) +## (def: comment-marker (format ..sigil ..sigil)) ## ## This is the parser for white-space. ## ## Whenever a new-line is encountered, the column gets reset to 0, and @@ -105,7 +105,7 @@ ## (def: (comment^ where) ## (-> Cursor (Lexer Cursor)) ## (do p.Monad<Parser> -## [_ (l.this ..single-line-comment-marker) +## [_ (l.this ..comment-marker) ## _ (l.some! (l.none-of! new-line)) ## _ ..new-line^] ## (wrap (|> where @@ -138,7 +138,6 @@ (case code ## Handle special cases. "n" (wrap [2 ..new-line]) - (^ (static ..text-delimiter)) (wrap [2 ..text-delimiter]) (^ (static ..escape)) (wrap [2 ..escape]) _ @@ -608,19 +607,6 @@ (["n" (static ..new-line)] [(~~ (static ..escape)) (static ..escape)]) - (^ (char (~~ (static ..text-delimiter)))) - (case (!find-next-escape 2 next-escape end source-code total (static ..text-delimiter)) - (#error.Error error) - (#error.Error error) - - (#error.Success [next-escape' post-delimiter so-far]) - (case ("lux text index" source-code (static ..text-delimiter) post-delimiter) - (#.Some end') - (recur end' next-escape' so-far) - - _ - (ex.throw invalid-escape-syntax []))) - _ (ex.throw invalid-escape-syntax [])))))) |