diff options
Diffstat (limited to 'examples/recovery.lua')
-rw-r--r-- | examples/recovery.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/recovery.lua b/examples/recovery.lua index 8d894c1..7e039c7 100644 --- a/examples/recovery.lua +++ b/examples/recovery.lua | |||
@@ -70,14 +70,14 @@ local function eval(input) | |||
70 | if #errors == 0 then | 70 | if #errors == 0 then |
71 | return result | 71 | return result |
72 | else | 72 | else |
73 | local out = "" | 73 | local out = {} |
74 | for i, err in ipairs(errors) do | 74 | for i, err in ipairs(errors) do |
75 | local pos = err[2] | 75 | local pos = err[2] |
76 | local msg = labels[err[1]][2] | 76 | local msg = labels[err[1]][2] |
77 | out = out .. "syntax error: " .. msg .. " (at index " .. pos .. ")\n" | 77 | table.insert(out, "syntax error: " .. msg .. " (at index " .. pos .. ")") |
78 | end | 78 | end |
79 | errors = {} | 79 | errors = {} |
80 | return nil, out | 80 | return nil, table.concat(out, "\n") |
81 | end | 81 | end |
82 | end | 82 | end |
83 | 83 | ||