diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic_mode.lua | 8 | ||||
-rw-r--r-- | examples/dynamic_dispatch_table.lua | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/examples/basic_mode.lua b/examples/basic_mode.lua index 04c16df..97cccd1 100644 --- a/examples/basic_mode.lua +++ b/examples/basic_mode.lua @@ -1,6 +1,12 @@ -return { +local commands = { ["%w+%s*\n"] = function(match) command_queue:enqueue(string.match(match , "(%w+)%s*")) end, [".*\n"] = function(match) end } + +local responses = { + [".*\n"] = function(match) end +} + +return commands, responses
\ No newline at end of file diff --git a/examples/dynamic_dispatch_table.lua b/examples/dynamic_dispatch_table.lua index c515621..4d94fa2 100644 --- a/examples/dynamic_dispatch_table.lua +++ b/examples/dynamic_dispatch_table.lua @@ -13,4 +13,8 @@ local get_length_table = { end } -return get_length_table +local responses = { + [".*\n"] = function(match) end +} + +return get_length_table, responses |