diff options
author | Eduardo Julian | 2014-12-13 00:54:09 -0400 |
---|---|---|
committer | Eduardo Julian | 2014-12-13 00:54:09 -0400 |
commit | 4a79a6c9cb2ca3e52b259cff987901f400c8ebc3 (patch) | |
tree | 5b4c26b5226ec2caa4ce613675dbffdc53cd2247 /src/lang/lexer.clj | |
parent | 8f5cd3917fd3a94ae99710a614dce9028f9afad8 (diff) |
+ Removed "module" special form.
+ Fixed a bug that was preventing multi-line comments from being truly multi-line.
Diffstat (limited to '')
-rw-r--r-- | src/lang/lexer.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lang/lexer.clj b/src/lang/lexer.clj index caaa15604..c88f54d57 100644 --- a/src/lang/lexer.clj +++ b/src/lang/lexer.clj @@ -53,19 +53,19 @@ (exec [_ (lex-str "#(") ;; :let [_ (prn 'OPEN)] ;; comment (lex-regex #"^(#\(.*\)#)") - comment (try-all-m [(lex-regex #"^((?!#\().)*?(?=\)#)") - (exec [pre (lex-regex #"^(.+?(?=#\())") + comment (try-all-m [(lex-regex #"(?is)^((?!#\().)*?(?=\)#)") + (exec [pre (lex-regex #"(?is)^(.+?(?=#\())") ;; :let [_ (prn 'PRE pre)] [_ inner] lex-multi-line-comment ;; :let [_ (prn 'INNER inner)] - post (lex-regex #"^(.+?(?=\)#))") + post (lex-regex #"(?is)^(.+?(?=\)#))") ;:let [_ (prn 'POST post)] ] (return (str pre "#(" inner ")#" post)))]) ;; :let [_ (prn 'COMMENT comment)] _ (lex-str ")#") ;; :let [_ (prn 'CLOSE)] - ;; :let [_ (prn 'multi-comment comment)] + :let [_ (prn 'multi-comment comment)] ] (return [::comment comment]))) |