diff options
author | Eduardo Julian | 2015-05-03 16:48:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-05-03 16:48:54 -0400 |
commit | 99dd3b322777d5abdaa976aa9445c168c234e139 (patch) | |
tree | 12551f1962542d4793445baf20fed9bed9a90a40 /src | |
parent | 6d803df4bdb4a68bba80cbbc4eeed02170813e96 (diff) |
- Fixed escaping in chars
- Added 2 custom pattern-matchers (\ & \or) & gensym
- Added signatures & structures ^_^
Diffstat (limited to 'src')
-rw-r--r-- | src/lux/analyser/lux.clj | 6 | ||||
-rw-r--r-- | src/lux/lexer.clj | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lux/analyser/lux.clj b/src/lux/analyser/lux.clj index 62b99a5b7..b52b816a7 100644 --- a/src/lux/analyser/lux.clj +++ b/src/lux/analyser/lux.clj @@ -264,9 +264,9 @@ (matchv ::M/objects [$def] [["lux;MacroD" macro]] (|do [macro-expansion #(-> macro (.apply ?args) (.apply %))] - (do (when (or (= "type`" ?name) - (= "deftype" ?name)) - (prn 'macro-expansion (str ?module ";" ?name) (->> macro-expansion (&/|map &/show-ast) (&/|interpose " ") (&/fold str "")))) + (do ;; (when (or (= "type`" ?name) + ;; (= "deftype" ?name)) + ;; (prn 'macro-expansion (str ?module ";" ?name) (->> macro-expansion (&/|map &/show-ast) (&/|interpose " ") (&/fold str "")))) (&/flat-map% (partial analyse exo-type) macro-expansion))) [_] diff --git a/src/lux/lexer.clj b/src/lux/lexer.clj index 983d94dc9..f0a8ba91a 100644 --- a/src/lux/lexer.clj +++ b/src/lux/lexer.clj @@ -70,7 +70,7 @@ (def ^:private lex-char (|do [[_ [meta _]] (&reader/read-text "#\"") - token (&/try-all% (&/|list (|do [escaped (&reader/read-regex #"^(\\.)")] + token (&/try-all% (&/|list (|do [[_ [_ escaped]] (&reader/read-regex #"^(\\.)")] (escape-char escaped)) (|do [[_ [_ char]] (&reader/read-regex #"^(.)")] (return char)))) |