diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-03 18:35:33 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-03 18:35:33 -0200 |
| commit | a5330b77f33725ce63d90f6ae664b651bb362042 (patch) | |
| tree | 9d7394fe8ba646cd6494dc79220b51ddf4262d25 | |
| parent | e1c2fb6eed19f597e2f05ab2dec969d144d5e4bb (diff) | |
| download | lua-a5330b77f33725ce63d90f6ae664b651bb362042.tar.gz lua-a5330b77f33725ce63d90f6ae664b651bb362042.tar.bz2 lua-a5330b77f33725ce63d90f6ae664b651bb362042.zip | |
static names do not need `luaX_' prefix
| -rw-r--r-- | lparser.c | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 2.6 2004/10/04 19:01:53 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.7 2004/11/19 16:59:08 roberto Exp roberto $ |
| 3 | ** Lua Parser | 3 | ** Lua Parser |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -31,7 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | #define getlocvar(fs, i) ((fs)->f->locvars[(fs)->actvar[i]]) | 32 | #define getlocvar(fs, i) ((fs)->f->locvars[(fs)->actvar[i]]) |
| 33 | 33 | ||
| 34 | #define luaY_checklimit(fs,v,l,m) if ((v)>(l)) luaY_errorlimit(fs,l,m) | 34 | #define luaY_checklimit(fs,v,l,m) if ((v)>(l)) errorlimit(fs,l,m) |
| 35 | 35 | ||
| 36 | #define enterlevel(ls) if (++(ls)->nestlevel > LUA_MAXPARSERLEVEL) \ | 36 | #define enterlevel(ls) if (++(ls)->nestlevel > LUA_MAXPARSERLEVEL) \ |
| 37 | luaX_lexerror(ls, "chunk has too many syntax levels", 0) | 37 | luaX_lexerror(ls, "chunk has too many syntax levels", 0) |
| @@ -90,7 +90,7 @@ static void error_expected (LexState *ls, int token) { | |||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | static void luaY_errorlimit (FuncState *fs, int limit, const char *what) { | 93 | static void errorlimit (FuncState *fs, int limit, const char *what) { |
| 94 | const char *msg = (fs->f->lineDefined == 0) ? | 94 | const char *msg = (fs->f->lineDefined == 0) ? |
| 95 | luaO_pushfstring(fs->L, "main function has more than %d %s", limit, what) : | 95 | luaO_pushfstring(fs->L, "main function has more than %d %s", limit, what) : |
| 96 | luaO_pushfstring(fs->L, "function at line %d has more than %d %s", | 96 | luaO_pushfstring(fs->L, "function at line %d has more than %d %s", |
| @@ -412,7 +412,7 @@ Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { | |||
| 412 | /*============================================================*/ | 412 | /*============================================================*/ |
| 413 | 413 | ||
| 414 | 414 | ||
| 415 | static void luaY_field (LexState *ls, expdesc *v) { | 415 | static void field (LexState *ls, expdesc *v) { |
| 416 | /* field -> ['.' | ':'] NAME */ | 416 | /* field -> ['.' | ':'] NAME */ |
| 417 | FuncState *fs = ls->fs; | 417 | FuncState *fs = ls->fs; |
| 418 | expdesc key; | 418 | expdesc key; |
| @@ -700,7 +700,7 @@ static void primaryexp (LexState *ls, expdesc *v) { | |||
| 700 | for (;;) { | 700 | for (;;) { |
| 701 | switch (ls->t.token) { | 701 | switch (ls->t.token) { |
| 702 | case '.': { /* field */ | 702 | case '.': { /* field */ |
| 703 | luaY_field(ls, v); | 703 | field(ls, v); |
| 704 | break; | 704 | break; |
| 705 | } | 705 | } |
| 706 | case '[': { /* `[' exp1 `]' */ | 706 | case '[': { /* `[' exp1 `]' */ |
| @@ -1210,10 +1210,10 @@ static int funcname (LexState *ls, expdesc *v) { | |||
| 1210 | int needself = 0; | 1210 | int needself = 0; |
| 1211 | singlevar(ls, v, 1); | 1211 | singlevar(ls, v, 1); |
| 1212 | while (ls->t.token == '.') | 1212 | while (ls->t.token == '.') |
| 1213 | luaY_field(ls, v); | 1213 | field(ls, v); |
| 1214 | if (ls->t.token == ':') { | 1214 | if (ls->t.token == ':') { |
| 1215 | needself = 1; | 1215 | needself = 1; |
| 1216 | luaY_field(ls, v); | 1216 | field(ls, v); |
| 1217 | } | 1217 | } |
| 1218 | return needself; | 1218 | return needself; |
| 1219 | } | 1219 | } |
