From 3b8a6b8bcc14ea279a4e6c005e740777b01ab623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 11 Oct 2018 14:07:32 +0800 Subject: function --- src/matcher/definition.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/matcher/definition.lua') 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() -- cgit v1.2.3