Delet goto from bluajit, since regular blua doesn't support that
This commit is contained in:
1 parent
89033de836
commit
5cfbc8ce48
2 files changed
+5
-12
No files matched your search
@@ -14,7 +14,7 @@
|
||||
/* Lua lexer tokens. */
|
||||
#define TKDEF(_, __) \
|
||||
_(and) _(break) _(continue) _(do) _(else) _(elseif) _(end) _(false) \
|
||||
_(for) _(function) _(goto) _(if) _(in) _(local) _(nil) _(not) _(or) \
|
||||
_(for) _(function) _(if) _(in) _(local) _(nil) _(not) _(or) \
|
||||
_(repeat) _(return) _(then) _(true) _(until) _(while) \
|
||||
__(concat, ..) __(dots, ...) __(eq, ==) __(ge, >=) __(le, <=) __(ne, ~=) \
|
||||
__(bxor, ^^) __(shl, <<) __(shr, >>) \
|
||||
|
||||
+4
-11
@@ -1147,7 +1147,7 @@ static void lex_match(LexState *ls, LexToken what, LexToken who, BCLine line)
|
||||
static GCstr *lex_str(LexState *ls)
|
||||
{
|
||||
GCstr *s;
|
||||
if (ls->tok != TK_name && (LJ_52 || ls->tok != TK_goto))
|
||||
if (ls->tok != TK_name && LJ_52)
|
||||
err_token(ls, TK_name);
|
||||
s = strV(&ls->tokval);
|
||||
lj_lex_next(ls);
|
||||
@@ -1876,7 +1876,7 @@ static void expr_table(LexState *ls, ExpDesc *e)
|
||||
if (!expr_isk(&key)) expr_index(fs, e, &key);
|
||||
if (expr_isnumk(&key) && expr_numiszero(&key)) needarr = 1; else nhash++;
|
||||
lex_check(ls, '=');
|
||||
} else if ((ls->tok == TK_name || (!LJ_52 && ls->tok == TK_goto)) &&
|
||||
} else if ((ls->tok == TK_name) &&
|
||||
lj_lex_lookahead(ls) == '=') {
|
||||
expr_str(ls, &key);
|
||||
lex_check(ls, '=');
|
||||
@@ -1972,7 +1972,7 @@ static BCReg parse_params(LexState *ls, int needself)
|
||||
var_new_lit(ls, nparams++, "self");
|
||||
if (ls->tok != ')') {
|
||||
do {
|
||||
if (ls->tok == TK_name || (!LJ_52 && ls->tok == TK_goto)) {
|
||||
if (ls->tok == TK_name) {
|
||||
var_new(ls, nparams++, lex_str(ls));
|
||||
} else if (ls->tok == TK_dots) {
|
||||
lj_lex_next(ls);
|
||||
@@ -2150,7 +2150,7 @@ static void expr_primary(LexState *ls, ExpDesc *v)
|
||||
expr(ls, v);
|
||||
lex_match(ls, ')', '(', line);
|
||||
expr_discharge(ls->fs, v);
|
||||
} else if (ls->tok == TK_name || (!LJ_52 && ls->tok == TK_goto)) {
|
||||
} else if (ls->tok == TK_name) {
|
||||
var_lookup(ls, v);
|
||||
} else if (ls->tok == '$') {
|
||||
uint64_t i = ls->tokval.u64;
|
||||
@@ -2990,13 +2990,6 @@ static int parse_stmt(LexState *ls)
|
||||
case TK_label:
|
||||
parse_label(ls);
|
||||
break;
|
||||
case TK_goto:
|
||||
if (LJ_52 || lj_lex_lookahead(ls) == TK_name) {
|
||||
lj_lex_next(ls);
|
||||
parse_goto(ls);
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
default:
|
||||
parse_call_assign(ls);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user