summaryrefslogtreecommitdiff
path: root/server-beta/src/core/tablefield.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-14 20:31:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-14 20:31:55 +0800
commitb735bbc94ce68bd1a7b66f2f2b195e4951508d42 (patch)
treeed408652a912cc98768ffa8fadc6798e8e718272 /server-beta/src/core/tablefield.lua
parent94e9133d7b25050212bbda323ef83f30142352e8 (diff)
downloadlua-language-server-b735bbc94ce68bd1a7b66f2f2b195e4951508d42.zip
整理代码
Diffstat (limited to 'server-beta/src/core/tablefield.lua')
-rw-r--r--server-beta/src/core/tablefield.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/server-beta/src/core/tablefield.lua b/server-beta/src/core/tablefield.lua
new file mode 100644
index 00000000..a5447e3f
--- /dev/null
+++ b/server-beta/src/core/tablefield.lua
@@ -0,0 +1,9 @@
+local m = {}
+
+function m:field(source, key, callback)
+ if source.value then
+ self:eachField(source.value, key, callback)
+ end
+end
+
+return m