diff options
Diffstat (limited to 'server-beta/src/core/goto.lua')
-rw-r--r-- | server-beta/src/core/goto.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server-beta/src/core/goto.lua b/server-beta/src/core/goto.lua new file mode 100644 index 00000000..4652f8be --- /dev/null +++ b/server-beta/src/core/goto.lua @@ -0,0 +1,13 @@ +local guide = require 'parser.guide' + +local m = {} + +function m:def(source, callback) + local name = source[1] + local label = guide.getLabel(source, name) + if label then + callback(label) + end +end + +return m |