diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-05 16:24:59 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-05 16:24:59 -0300 |
| commit | be8120906304a8658fab998587b969e0e42f5650 (patch) | |
| tree | 81cf2d38522b10468d09763fc25d261486008197 /llex.c | |
| parent | e05590591410a5e007a1e3f1691f6c1cf9d8fe45 (diff) | |
| download | lua-be8120906304a8658fab998587b969e0e42f5650.tar.gz lua-be8120906304a8658fab998587b969e0e42f5650.tar.bz2 lua-be8120906304a8658fab998587b969e0e42f5650.zip | |
First implementation of global declarations
Diffstat (limited to 'llex.c')
| -rw-r--r-- | llex.c | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -40,11 +40,16 @@ | |||
| 40 | 40 | ||
| 41 | #define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') | 41 | #define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') |
| 42 | 42 | ||
| 43 | #if defined(LUA_COMPAT_GLOBAL) | ||
| 44 | #define GLOBALLEX ".g" /* not recognizable by the scanner */ | ||
| 45 | #else | ||
| 46 | #define GLOBALLEX "global" | ||
| 47 | #endif | ||
| 43 | 48 | ||
| 44 | /* ORDER RESERVED */ | 49 | /* ORDER RESERVED */ |
| 45 | static const char *const luaX_tokens [] = { | 50 | static const char *const luaX_tokens [] = { |
| 46 | "and", "break", "do", "else", "elseif", | 51 | "and", "break", "do", "else", "elseif", |
| 47 | "end", "false", "for", "function", "goto", "if", | 52 | "end", "false", "for", "function", GLOBALLEX, "goto", "if", |
| 48 | "in", "local", "nil", "not", "or", "repeat", | 53 | "in", "local", "nil", "not", "or", "repeat", |
| 49 | "return", "then", "true", "until", "while", | 54 | "return", "then", "true", "until", "while", |
| 50 | "//", "..", "...", "==", ">=", "<=", "~=", | 55 | "//", "..", "...", "==", ">=", "<=", "~=", |
