Debian Codegraph @

test/plugin/lua-plugin.lua

raw
1 -- inject some macros into rootScope
2 local fennel = require('fennel')
3
4 local function inscope(s)
5 return _G['in-scope?'](s)
6 end
7
8 local rootScope = fennel.scope()
9 while rootScope.parent do rootScope = rootScope.parent end
10
11 rootScope.macros['is-in-scope'] = inscope
12
13 return {name = "in-scope-lua-plugin", versions = "^1."}