diff options
author | Emil Renner Berthing <esmil@mailme.dk> | 2016-01-07 22:39:28 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@mailme.dk> | 2016-01-08 00:20:13 +0100 |
commit | 4c0ad860e7710b8cecaa13b96dfc6bdb8d6a14ea (patch) | |
tree | 089aff1638d71783695571cdae7cbf026277b5eb /lua/llex.h | |
parent | e005effffa9b69bb1a93a8031308700ae8e4a857 (diff) | |
download | lem-4c0ad860e7710b8cecaa13b96dfc6bdb8d6a14ea.tar.gz lem-4c0ad860e7710b8cecaa13b96dfc6bdb8d6a14ea.tar.xz lem-4c0ad860e7710b8cecaa13b96dfc6bdb8d6a14ea.zip |
Lua 5.3.2
Diffstat (limited to 'lua/llex.h')
-rw-r--r-- | lua/llex.h | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,5 @@ /* -** $Id: llex.h,v 1.72.1.1 2013/04/12 18:48:47 roberto Exp $ +** $Id: llex.h,v 1.78 2014/10/29 15:38:24 roberto Exp $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -14,6 +14,10 @@ #define FIRST_RESERVED 257 +#if !defined(LUA_ENV) +#define LUA_ENV "_ENV" +#endif + /* * WARNING: if you change the order of this enumeration, @@ -26,8 +30,10 @@ enum RESERVED { TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, /* other terminal symbols */ - TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_DBCOLON, TK_EOS, - TK_NUMBER, TK_NAME, TK_STRING + TK_IDIV, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, + TK_SHL, TK_SHR, + TK_DBCOLON, TK_EOS, + TK_FLT, TK_INT, TK_NAME, TK_STRING }; /* number of reserved words */ @@ -36,6 +42,7 @@ enum RESERVED { typedef union { lua_Number r; + lua_Integer i; TString *ts; } SemInfo; /* semantics information */ @@ -51,13 +58,14 @@ typedef struct Token { typedef struct LexState { int current; /* current character (charint) */ int linenumber; /* input line counter */ - int lastline; /* line of last token `consumed' */ + int lastline; /* line of last token 'consumed' */ Token t; /* current token */ Token lookahead; /* look ahead token */ struct FuncState *fs; /* current function (parser) */ struct lua_State *L; ZIO *z; /* input stream */ Mbuffer *buff; /* buffer for tokens */ + Table *h; /* to avoid collection/reuse strings */ struct Dyndata *dyd; /* dynamic structures used by the parser */ TString *source; /* current source name */ TString *envn; /* environment variable name */ |