From 4a79a6c9cb2ca3e52b259cff987901f400c8ebc3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 13 Dec 2014 00:54:09 -0400 Subject: + Removed "module" special form. + Fixed a bug that was preventing multi-line comments from being truly multi-line. --- src/lang/lexer.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lang/lexer.clj') 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]))) -- cgit v1.2.3