summaryrefslogtreecommitdiff
path: root/server-beta/src/core/getlocal.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/core/getlocal.lua')
-rw-r--r--server-beta/src/core/getlocal.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/server-beta/src/core/getlocal.lua b/server-beta/src/core/getlocal.lua
new file mode 100644
index 00000000..89a35c30
--- /dev/null
+++ b/server-beta/src/core/getlocal.lua
@@ -0,0 +1,15 @@
+local m = {}
+
+function m:def(source, callback)
+ self:search(source.loc, 'local', 'def', callback)
+end
+
+function m:ref(source, callback)
+ self:search(source.loc, 'local', 'ref', callback)
+end
+
+function m:field(source, callback)
+ self:search(source.loc, 'local', 'field', callback)
+end
+
+return m