binana/profile/3.3.5a-windows-386/include/lua/lex.h

36 lines
889 B
C
Raw Normal View History

2026-04-15 13:55:03 -04:00
#ifndef LUA_LEX_H
#define LUA_LEX_H
DECLARE_UNION(SemInfo);
2026-04-15 13:57:31 -04:00
DECLARE_STRUCT(Token);
2026-04-15 13:55:03 -04:00
DECLARE_STRUCT(LexState);
#include "lua/parser.h"
#include "lua/state.h"
union SemInfo {
lua_Number r;
TString* ts;
}; /* semantics information */
2026-04-15 13:57:31 -04:00
struct Token {
int32_t token;
2026-04-15 13:55:03 -04:00
SemInfo seminfo;
2026-04-15 13:57:31 -04:00
};
2026-04-15 13:55:03 -04:00
struct LexState {
int32_t current; /* current character (charint) */
int32_t linenumber; /* input line counter */
int32_t lastline; /* line of last token `consumed' */
Token t; /* current token */
Token lookahead; /* look ahead token */
FuncState* fs; /* `FuncState' is private to the parser */
lua_State* L;
ZIO* z; /* input stream */
Mbuffer* buff; /* buffer for tokens */
TString* source; /* current source name */
char decpoint; /* locale decimal point */
};
#endif