aboutsummaryrefslogtreecommitdiff
path: root/lpvm.c
diff options
context:
space:
mode:
authorSérgio Queiroz <sqmedeiros@gmail.com>2017-12-12 11:42:14 -0300
committerSérgio Queiroz <sqmedeiros@gmail.com>2017-12-12 11:42:14 -0300
commit26c1b9aa78e10b2ed2d36d151033fe94254fa8c5 (patch)
tree743f8cca325a2788cd0aa9e98de79ab275884d01 /lpvm.c
parent5ffef3da93ad53069d2510a75b11ecbb1b6e8aa7 (diff)
downloadlpeglabel-26c1b9aa78e10b2ed2d36d151033fe94254fa8c5.tar.gz
lpeglabel-26c1b9aa78e10b2ed2d36d151033fe94254fa8c5.tar.bz2
lpeglabel-26c1b9aa78e10b2ed2d36d151033fe94254fa8c5.zip
Using field 'key' to allow strings as labels (partial)
Diffstat (limited to 'lpvm.c')
-rw-r--r--lpvm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lpvm.c b/lpvm.c
index d2b1f55..61d609a 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -331,7 +331,11 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
331 continue; 331 continue;
332 } 332 }
333 case IThrow: { /* labeled failure */ 333 case IThrow: { /* labeled failure */
334 *labelf = p->i.aux; 334 printf("IThrow here: key=%d aux = %d top = %d\n", p->i.key, p->i.aux, lua_gettop(L));
335 lua_rawgeti(L, ktableidx(ptop), p->i.key);
336 printf("IThrow there %s top = %d\n", lua_tostring(L, -1), lua_gettop(L));
337 lua_pop(L, 1);
338 *labelf = p->i.key;
335 pk = p + 1; 339 pk = p + 1;
336 *sfail = s; 340 *sfail = s;
337 goto fail; 341 goto fail;