diff options
Diffstat (limited to 'examples/listId1.lua')
-rw-r--r-- | examples/listId1.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/listId1.lua b/examples/listId1.lua index e075bd1..0bf26a1 100644 --- a/examples/listId1.lua +++ b/examples/listId1.lua | |||
@@ -8,12 +8,12 @@ local g = m.P{ | |||
8 | } | 8 | } |
9 | 9 | ||
10 | function mymatch (g, s) | 10 | function mymatch (g, s) |
11 | local r, e = g:match(s) | 11 | local r, e, sfail = g:match(s) |
12 | if not r then | 12 | if not r then |
13 | if e == 1 then | 13 | if e == 1 then |
14 | return r, "Error: expecting an identifier" | 14 | return r, "Error: expecting an identifier before '" .. sfail .. "'" |
15 | elseif e == 2 then | 15 | elseif e == 2 then |
16 | return r, "Error: expecting ','" | 16 | return r, "Error: expecting ',' before '" .. sfail .. "'" |
17 | else | 17 | else |
18 | return r, "Error" | 18 | return r, "Error" |
19 | end | 19 | end |