diff options
Diffstat (limited to 'src/lang')
| -rw-r--r-- | src/lang/analyser.clj | 8 | ||||
| -rw-r--r-- | src/lang/compiler.clj | 10 | ||||
| -rw-r--r-- | src/lang/lexer.clj | 8 | 
3 files changed, 8 insertions, 18 deletions
| diff --git a/src/lang/analyser.clj b/src/lang/analyser.clj index 811cc93ea..c40fccffb 100644 --- a/src/lang/analyser.clj +++ b/src/lang/analyser.clj @@ -173,11 +173,6 @@          (return (annotated [::def [?name args] =value] ::&type/nothing))))      )) -(defanalyser analyse-module -  [::&parser/module] -  (exec [name module-name] -    (return (annotated [::module name] ::&type/nothing)))) -  (def ^:private analyse-form    (try-all-m [analyse-boolean                analyse-string @@ -191,8 +186,7 @@                analyse-let                analyse-defclass                analyse-definterface -              analyse-def -              analyse-module])) +              analyse-def]))  ;; [Interface]  (defn analyse [module-name tokens] diff --git a/src/lang/compiler.clj b/src/lang/compiler.clj index 8b73720c4..a8d38842a 100644 --- a/src/lang/compiler.clj +++ b/src/lang/compiler.clj @@ -168,11 +168,6 @@            (.visitEnd))))      )) -(defcompiler ^:private compile-module -  [::&analyser/module ?name] -  (.visit *writer* Opcodes/V1_5 (+ Opcodes/ACC_PUBLIC Opcodes/ACC_SUPER) -          (->class ?name) nil "java/lang/Object" nil)) -  (defcompiler ^:private compile-defclass    [::&analyser/defclass [?package ?name] ?members]    (let [parent-dir (->package ?package) @@ -236,7 +231,6 @@                     compile-if                     compile-let                     compile-def -                   compile-module                     compile-defclass                     compile-definterface                     compile-variant]] @@ -248,7 +242,9 @@  ;; [Interface]  (defn compile [class-name inputs]    (prn 'inputs inputs) -  (let [=class (new ClassWriter ClassWriter/COMPUTE_MAXS) +  (let [=class (doto (new ClassWriter ClassWriter/COMPUTE_MAXS) +                 (.visit Opcodes/V1_5 (+ Opcodes/ACC_PUBLIC Opcodes/ACC_SUPER) +                         (->class class-name) nil "java/lang/Object" nil))          ;; (doto (new ClassWriter ClassWriter/COMPUTE_MAXS)          ;;          (.visit Opcodes/V1_5 (+ Opcodes/ACC_PUBLIC Opcodes/ACC_SUPER)          ;;                  "output" nil "java/lang/Object" nil)) 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]))) | 
