summaryrefslogtreecommitdiff
path: root/server-beta/src/core/field.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/core/field.lua')
-rw-r--r--server-beta/src/core/field.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/server-beta/src/core/field.lua b/server-beta/src/core/field.lua
index 997b38e3..4d48bd93 100644
--- a/server-beta/src/core/field.lua
+++ b/server-beta/src/core/field.lua
@@ -1,4 +1,5 @@
-local guide = require 'parser.guide'
+local guide = require 'parser.guide'
+local checkSMT = require 'core.setmetatable'
local m = {}
@@ -32,6 +33,10 @@ function m:ref(source, callback)
end
end
+function m:field(source, key, callback)
+ self:eachField(source.parent, key, callback)
+end
+
function m:value(source, callback)
local parent = source.parent
if parent.type == 'setfield'