lexer: move this macro definition
This commit is contained in:
parent
698a10e4ba
commit
cad0e29978
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue