| 547 | |
| 548 | |
| 549 | void luaX_next (LexState *ls) { |
| 550 | ls->lastline = ls->linenumber; |
| 551 | if (ls->lookahead.token != TK_EOS) { /* is there a look-ahead token? */ |
| 552 | ls->t = ls->lookahead; /* use this one */ |
| 553 | ls->lookahead.token = TK_EOS; /* and discharge it */ |
| 554 | } |
| 555 | else |
| 556 | ls->t.token = llex(ls, &ls->t.seminfo); /* read next token */ |
| 557 | } |
| 558 | |
| 559 | |
| 560 | int luaX_lookahead (LexState *ls) { |