~technomancy/fennel

31c3eff94d03862dcd93765d612eccace92b02a8 — Phil Hagelberg 5 days ago 0d2935b main
Don't use fennel.friend unless the io table exists.
2 files changed, 2 insertions(+), 2 deletions(-)

M src/fennel/compiler.fnl
M src/fennel/parser.fnl
M src/fennel/compiler.fnl => src/fennel/compiler.fnl +1 -1
@@ 49,7 49,7 @@ The ast arg should be unmodified so that its first element is the form called."
  (when (not condition)
    (let [{: source : unfriendly} (or utils.root.options {})]
      (utils.root.reset)
      (if unfriendly
      (if (or unfriendly (not _G.io) (not _G.io.read))
          ;; if we use regular `assert' we can't set level to 0
          (error (assert-msg ast msg) 0)
          (friend.assert-compile condition msg ast source))))

M src/fennel/parser.fnl => src/fennel/parser.fnl +1 -1
@@ 97,7 97,7 @@ stream is finished."
  (fn parse-error [msg byteindex-override]
    (let [{: source : unfriendly} (or options utils.root.options {})]
      (utils.root.reset)
      (if unfriendly
      (if (or unfriendly (not _G.io) (not _G.io.read))
          (error (string.format "Parse error in %s:%s: %s"
                                (or filename :unknown) (or line "?") msg)
                 0)