diff options
Diffstat (limited to 'src/matcher')
-rw-r--r-- | src/matcher/definition.lua | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/matcher/definition.lua b/src/matcher/definition.lua index 91b5090f..8656892a 100644 --- a/src/matcher/definition.lua +++ b/src/matcher/definition.lua @@ -49,12 +49,16 @@ function defs.Name(p, str) return {str, p} end -function defs.LocalVar(name) - scopeSet(name) +function defs.LocalVar(names) + for _, name in ipairs(names) do + scopeSet(name) + end end -function defs.LocalSet(name) - scopeSet(name) +function defs.LocalSet(names) + for _, name in ipairs(names) do + scopeSet(name) + end end function defs.Function(func) @@ -110,7 +114,7 @@ function defs.LoopStart(name, exp) return name end -function defs.InList(...) +function defs.NameList(...) return {...} end @@ -125,6 +129,22 @@ function defs.In() scopePop() end +function defs.WhileDef() + scopePush() +end + +function defs.While() + scopePop() +end + +function defs.RepeatDef() + scopePush() +end + +function defs.Until() + scopePop() +end + return function (buf, pos_) pos = pos_ result = nil |