diff options
Diffstat (limited to 'src/matcher/definition.lua')
-rw-r--r-- | src/matcher/definition.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/matcher/definition.lua b/src/matcher/definition.lua index bf7457e7..b18e1a01 100644 --- a/src/matcher/definition.lua +++ b/src/matcher/definition.lua @@ -54,6 +54,15 @@ function defs.Name(str) return {str, namePos} end +function defs.DOTSPos(p) + namePos = p +end + +function defs.DOTS(str) + checkDifinition(str, namePos) + return {str, namePos} +end + function defs.LocalVar(names) for _, name in ipairs(names) do scopeSet(name) @@ -66,10 +75,13 @@ function defs.LocalSet(names) end end -function defs.FunctionDef(names) +function defs.FunctionDef(names, args) if #names == 1 then scopeSet(names[1]) end + for _, arg in ipairs(args) do + scopeSet(arg) + end scopePush() end |