summaryrefslogtreecommitdiff
path: root/server/src/matcher/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-10 11:03:12 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-10 11:03:12 +0800
commitbe6e0ee6d31d79005691b982c02e7699a7ae3762 (patch)
tree15bca6f55c6acd92bcfcb772a9008efe0d6dc594 /server/src/matcher/compile.lua
parentd19514f1904557a464467bfc9540882b4a214840 (diff)
downloadlua-language-server-be6e0ee6d31d79005691b982c02e7699a7ae3762.zip
布尔和数字
Diffstat (limited to 'server/src/matcher/compile.lua')
-rw-r--r--server/src/matcher/compile.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua
index bcf2ca91..c6ccedfe 100644
--- a/server/src/matcher/compile.lua
+++ b/server/src/matcher/compile.lua
@@ -278,13 +278,31 @@ function mt:getString(exp)
}
end
+function mt:getBoolean(exp)
+ return {
+ type = 'boolean',
+ boolean = exp[1],
+ valuetype = 'boolean',
+ }
+end
+
+function mt:getNumber(exp)
+ return {
+ type = 'number',
+ number = exp[1],
+ valuetype = 'number',
+ }
+end
+
function mt:searchExp(exp)
local tp = exp.type
if tp == 'nil' then
elseif tp == 'string' then
return self:getString(exp)
elseif tp == 'boolean' then
+ return self:getBoolean(exp)
elseif tp == 'number' then
+ return self:getNumber(exp)
elseif tp == 'name' then
return self:checkName(exp)
elseif tp == 'simple' then