diff options
author | Mike Pall <mike> | 2011-12-17 15:02:00 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-12-17 15:02:00 +0100 |
commit | d050b2fff56011b8fafb754ad579c02e04097953 (patch) | |
tree | 8093c733cc11f8743a21c02bc29e8667347c4c5b | |
parent | ba4917b71bba55e61f4ce644100cdb4e114ccfc5 (diff) | |
download | luajit-d050b2fff56011b8fafb754ad579c02e04097953.tar.gz luajit-d050b2fff56011b8fafb754ad579c02e04097953.tar.bz2 luajit-d050b2fff56011b8fafb754ad579c02e04097953.zip |
FFI: Ignore empty statements in ffi.cdef().
-rw-r--r-- | src/lj_cparse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_cparse.c b/src/lj_cparse.c index 118de1e0..09b1ca06 100644 --- a/src/lj_cparse.c +++ b/src/lj_cparse.c | |||
@@ -1728,6 +1728,10 @@ static void cp_decl_multi(CPState *cp) | |||
1728 | while (cp->tok != CTOK_EOF) { | 1728 | while (cp->tok != CTOK_EOF) { |
1729 | CPDecl decl; | 1729 | CPDecl decl; |
1730 | CPscl scl; | 1730 | CPscl scl; |
1731 | if (cp_opt(cp, ';')) { /* Skip empty statements. */ | ||
1732 | first = 0; | ||
1733 | continue; | ||
1734 | } | ||
1731 | if (cp->tok == '#') { /* Workaround, since we have no preprocessor, yet. */ | 1735 | if (cp->tok == '#') { /* Workaround, since we have no preprocessor, yet. */ |
1732 | BCLine pragmaline = cp->linenumber; | 1736 | BCLine pragmaline = cp->linenumber; |
1733 | if (!(cp_next(cp) == CTOK_IDENT && | 1737 | if (!(cp_next(cp) == CTOK_IDENT && |