~pepe/jlnt.kak

4438d7d1c8bea7af4b1af21c0576685425c2a8ac — Josef Pospíšil 8 months ago eed3163
Fix linting macros
1 files changed, 8 insertions(+), 1 deletions(-)

M jlnt
M jlnt => jlnt +8 -1
@@ 13,11 13,18 @@
      (printf "%s:%i:%i: %s: %s" file l c "error" (:error p)))
    (unless c
      (:eof p)
      (def macros @[])
      (while (:has-more p)
        (def pr (:produce p))
        (def [f s _] pr)
        (def cr (compile pr))
        (if (function? cr)
          (if (= (pr 0) 'import) (cr))
          (cond
            (= f 'import) (cr)
            (= f 'defmacro) (do
                              (array/push macros s)
                              (cr))
            (find |(= $ f) macros) (cr))
          (do
            (var {:line l :column c :error e} cr)
            (unless (pos? l) (set l 1) (set c 1))