summaryrefslogtreecommitdiff
path: root/server/src/vm/label.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-31 18:11:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-31 18:11:10 +0800
commit076aca36bab28e805a85ee2e6a8f347a9ea83ba7 (patch)
treee4b226855365c6812b7b1c97dfe8d16decd9cf5d /server/src/vm/label.lua
parent92424baf13c2487145456e4062f9f4214f8b7bcd (diff)
downloadlua-language-server-076aca36bab28e805a85ee2e6a8f347a9ea83ba7.zip
整理代码
Diffstat (limited to 'server/src/vm/label.lua')
-rw-r--r--server/src/vm/label.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/src/vm/label.lua b/server/src/vm/label.lua
new file mode 100644
index 00000000..f8f8eb81
--- /dev/null
+++ b/server/src/vm/label.lua
@@ -0,0 +1,15 @@
+local mt = {}
+mt.__index = mt
+mt.type = 'label'
+
+function mt:getName()
+ return self.name
+end
+
+return function (name, source)
+ local self = setmetatable({
+ name = name,
+ source = source,
+ }, mt)
+ return self
+end