lexer: move this macro definition

This commit is contained in:
tocariimaa 2025-01-12 23:17:46 -03:00
parent 698a10e4ba
commit cad0e29978

View file

@ -439,6 +439,8 @@ keyword(LexToken *t)
LexToken
lex_scan(LexState *ls)
{
#define TOKEN(chr, t) case chr: token.id = t; break;
if (arrlen(ls->backlist) > 0) {
return arrpop(ls->backlist);
}
@ -454,7 +456,6 @@ lex_scan(LexState *ls)
}
token.loc = ls->cur_loc;
#define TOKEN(chr, t) case chr: token.id = t; break;
//trace("token now: '%c'\n", c.val);
//trace("lp: <%s>\n", ls->lbegin);
//trace("fwd: <%s>\n", ls->fwd);