#include "lobject.h"#include "lzio.h"Go to the source code of this file.
Classes | |
| union | SemInfo |
| struct | Token |
| struct | LexState |
Defines | |
| #define | FIRST_RESERVED 257 |
| #define | TOKEN_LEN (sizeof("function")/sizeof(char)) |
| #define | NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) |
Enumerations | |
| enum | RESERVED { TK_AND = FIRST_RESERVED, TK_BREAK, TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER, TK_NAME, TK_STRING, TK_EOS } |
Functions | |
| LUAI_FUNC void | luaX_init (lua_State *L) |
| LUAI_FUNC void | luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source) |
| LUAI_FUNC TString * | luaX_newstring (LexState *ls, const char *str, size_t l) |
| LUAI_FUNC void | luaX_next (LexState *ls) |
| LUAI_FUNC void | luaX_lookahead (LexState *ls) |
| LUAI_FUNC void | luaX_lexerror (LexState *ls, const char *msg, int token) |
| LUAI_FUNC void | luaX_syntaxerror (LexState *ls, const char *s) |
| LUAI_FUNC const char * | luaX_token2str (LexState *ls, int token) |
Variables | |
| LUAI_DATA const char *const | luaX_tokens [] |
| #define FIRST_RESERVED 257 |
| #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) |
| #define TOKEN_LEN (sizeof("function")/sizeof(char)) |
| enum RESERVED |
| LUAI_FUNC void luaX_init | ( | lua_State * | L | ) |
Definition at line 64 of file llex.cpp.
References cast_byte, lua_assert, luaS_fix, luaS_new, luaX_tokens, NUM_RESERVED, TString::reserved, LangStringUtil::strlen(), TOKEN_LEN, and TString::tsv.
| LUAI_FUNC void luaX_lexerror | ( | LexState * | ls, | |
| const char * | msg, | |||
| int | token | |||
| ) |
Definition at line 102 of file llex.cpp.
References getstr, LexState::L, LexState::linenumber, LUA_ERRSYNTAX, LUA_QS, luaD_throw(), luaO_chunkid(), luaO_pushfstring(), MAXSRC, LexState::source, and txtToken().
| LUAI_FUNC void luaX_lookahead | ( | LexState * | ls | ) |
Definition at line 457 of file llex.cpp.
References llex(), LexState::lookahead, lua_assert, Token::seminfo, TK_EOS, and Token::token.
Definition at line 117 of file llex.cpp.
References LexState::fs, FuncState::h, LexState::L, luaH_setstr(), luaS_newlstr(), setbvalue, and ttisnil.
| LUAI_FUNC void luaX_next | ( | LexState * | ls | ) |
Definition at line 446 of file llex.cpp.
References LexState::lastline, LexState::linenumber, llex(), LexState::lookahead, Token::seminfo, LexState::t, TK_EOS, and Token::token.
Definition at line 138 of file llex.cpp.
References LexState::buff, LexState::decpoint, LexState::fs, LexState::L, LexState::lastline, LexState::linenumber, LexState::lookahead, LUA_MINBUFFER, luaZ_resizebuffer, next, NULL, LexState::source, TK_EOS, Token::token, and LexState::z.
| LUAI_FUNC void luaX_syntaxerror | ( | LexState * | ls, | |
| const char * | s | |||
| ) |
| LUAI_FUNC const char* luaX_token2str | ( | LexState * | ls, | |
| int | token | |||
| ) |
Definition at line 78 of file llex.cpp.
References cast, FIRST_RESERVED, LexState::L, lua_assert, luaO_pushfstring(), and luaX_tokens.
| LUAI_DATA const char* const luaX_tokens[] |
1.5.3