diff --git a/src/lj_errmsg.h b/src/lj_errmsg.h index f368da5a..7097f5e3 100644 --- a/src/lj_errmsg.h +++ b/src/lj_errmsg.h @@ -135,7 +135,9 @@ ERRDEF(XLIMF, "function at line %d has more than %d %s") ERRDEF(XMATCH, LUA_QS " expected (to close " LUA_QS " at line %d)") ERRDEF(XFIXUP, "function too long for return fixup") ERRDEF(XPARAM, " or " LUA_QL("...") " expected") +#if !LJ_52 ERRDEF(XAMBIG, "ambiguous syntax (function call x new statement)") +#endif ERRDEF(XFUNARG, "function arguments expected") ERRDEF(XSYMBOL, "unexpected symbol") ERRDEF(XDOTS, "cannot use " LUA_QL("...") " outside a vararg function") diff --git a/src/lj_parse.c b/src/lj_parse.c index d0396a59..2bb8c92f 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c @@ -1910,8 +1910,10 @@ static void parse_args(LexState *ls, ExpDesc *e) BCReg base; BCLine line = ls->linenumber; if (ls->token == '(') { +#if !LJ_52 if (line != ls->lastline) err_syntax(ls, LJ_ERR_XAMBIG); +#endif lj_lex_next(ls); if (ls->token == ')') { /* f(). */ args.k = VVOID;