summaryrefslogtreecommitdiff
path: root/src/matcher/definition.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-10-11 14:07:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-10-11 14:07:32 +0800
commit3b8a6b8bcc14ea279a4e6c005e740777b01ab623 (patch)
tree1de9456ecdf90d2a22059ee10c8ad01302a208d1 /src/matcher/definition.lua
parent16af212c379e9927143b37bedebcf884445bfdbd (diff)
downloadlua-language-server-3b8a6b8bcc14ea279a4e6c005e740777b01ab623.zip
function
Diffstat (limited to 'src/matcher/definition.lua')
-rw-r--r--src/matcher/definition.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/matcher/definition.lua b/src/matcher/definition.lua
index 8656892a..86ea400b 100644
--- a/src/matcher/definition.lua
+++ b/src/matcher/definition.lua
@@ -61,12 +61,15 @@ function defs.LocalSet(names)
end
end
-function defs.Function(func)
- local names = func.name
- if names and #names == 1 then
+function defs.FunctionDef(names)
+ if #names == 1 then
scopeSet(names[1])
end
- return func
+ scopePush()
+end
+
+function defs.Function()
+ scopePop()
end
function defs.DoDef()