Remove goto stuff from bluajit
this wasnt in the main repo but kart does not have goto so we dont allow modders to screw things up
This commit is contained in:
1 parent
e6f16fbda5
commit
709828e40e
3 files changed
+8
-14
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, >>) \
|
||||
|
||||
@@ -1151,7 +1151,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);
|
||||
@@ -1880,7 +1880,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, '=');
|
||||
@@ -1976,7 +1976,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);
|
||||
@@ -2154,7 +2154,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;
|
||||
@@ -2994,13 +2994,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;
|
||||
|
||||
@@ -496,8 +496,9 @@ StrScanFmt lj_strscan_scan(const uint8_t *p, MSize len, TValue *o,
|
||||
#endif
|
||||
|
||||
#if LJ_INTONLY
|
||||
/* Skip trailing whitespace */
|
||||
while (lj_char_isspace(*p)) p++;
|
||||
/* Skip trailing spaces */
|
||||
while (lj_char_isspace(*p)) p++;
|
||||
|
||||
if (*p || p < pe)
|
||||
return STRSCAN_ERROR;
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user