diff options
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r-- | server/src/parser/ast.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 9903dca2..0e408c73 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -1233,9 +1233,23 @@ local Defs = { ... } end, - EmmyParam = function (argName, emmyName, ...) + EmmyParam = function (argName, emmyName, options, ...) + local option + if options then + option = {} + for _, pair in ipairs(options) do + if pair.type == 'pair' then + local key = pair[1] + local value = pair[2] + if key.type == 'name' then + option[key[1]] = value[1] + end + end + end + end local emmy = { type = 'emmyParam', + option = option, argName, emmyName, ... |