~technomancy/fennel

2e0ce2e21198a6aae1b2fc8d7e4b8a7d7d3ab11b — Phil Hagelberg 3 months ago b09dea6
Top-level global tables were getting omitted from fennel.syntax.
1 files changed, 5 insertions(+), 3 deletions(-)

M src/fennel.fnl
M src/fennel.fnl => src/fennel.fnl +5 -3
@@ 86,9 86,11 @@
    (each [k v (pairs _G)]
      (match (type v)
        :function (tset out k {:global? true})
        :table (each [k2 v2 (pairs v)]
                 (when (and (= :function (type v2)) (not= k :_G))
                   (tset out (.. k "." k2) {:function? true :global? true})))))
        :table (do
                 (each [k2 v2 (pairs v)]
                   (when (and (= :function (type v2)) (not= k :_G))
                     (tset out (.. k "." k2) {:function? true :global? true})))
                 (tset out k {:global? true}))))
    out))

;; The public API module we export: