diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-25 09:50:46 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-25 09:50:46 -0200 |
| commit | bdf566a8a32450c2eb6273c8c1a92e2181b6846e (patch) | |
| tree | b301da541fbad81034216a6e0465cc381082431e /llex.c | |
| parent | c3c78030f79fdbbb06265d50645e408d60e7798e (diff) | |
| download | lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.gz lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.bz2 lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.zip | |
`name' in comments changed to 'name'
Diffstat (limited to 'llex.c')
| -rw-r--r-- | llex.c | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 2.83 2014/10/17 16:28:21 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.84 2014/10/22 11:44:20 roberto Exp roberto $ |
| 3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -125,7 +125,7 @@ l_noret luaX_syntaxerror (LexState *ls, const char *msg) { | |||
| 125 | */ | 125 | */ |
| 126 | TString *luaX_newstring (LexState *ls, const char *str, size_t l) { | 126 | TString *luaX_newstring (LexState *ls, const char *str, size_t l) { |
| 127 | lua_State *L = ls->L; | 127 | lua_State *L = ls->L; |
| 128 | TValue *o; /* entry for `str' */ | 128 | TValue *o; /* entry for 'str' */ |
| 129 | TString *ts = luaS_newlstr(L, str, l); /* create new string */ | 129 | TString *ts = luaS_newlstr(L, str, l); /* create new string */ |
| 130 | setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ | 130 | setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ |
| 131 | o = luaH_set(L, ls->h, L->top - 1); | 131 | o = luaH_set(L, ls->h, L->top - 1); |
| @@ -150,9 +150,9 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) { | |||
| 150 | static void inclinenumber (LexState *ls) { | 150 | static void inclinenumber (LexState *ls) { |
| 151 | int old = ls->current; | 151 | int old = ls->current; |
| 152 | lua_assert(currIsNewline(ls)); | 152 | lua_assert(currIsNewline(ls)); |
| 153 | next(ls); /* skip `\n' or `\r' */ | 153 | next(ls); /* skip '\n' or '\r' */ |
| 154 | if (currIsNewline(ls) && ls->current != old) | 154 | if (currIsNewline(ls) && ls->current != old) |
| 155 | next(ls); /* skip `\n\r' or `\r\n' */ | 155 | next(ls); /* skip '\n\r' or '\r\n' */ |
| 156 | if (++ls->linenumber >= MAX_INT) | 156 | if (++ls->linenumber >= MAX_INT) |
| 157 | luaX_syntaxerror(ls, "chunk has too many lines"); | 157 | luaX_syntaxerror(ls, "chunk has too many lines"); |
| 158 | } | 158 | } |
| @@ -298,7 +298,7 @@ static int skip_sep (LexState *ls) { | |||
| 298 | 298 | ||
| 299 | static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) { | 299 | static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) { |
| 300 | int line = ls->linenumber; /* initial line (for error message) */ | 300 | int line = ls->linenumber; /* initial line (for error message) */ |
| 301 | save_and_next(ls); /* skip 2nd `[' */ | 301 | save_and_next(ls); /* skip 2nd '[' */ |
| 302 | if (currIsNewline(ls)) /* string starts with a newline? */ | 302 | if (currIsNewline(ls)) /* string starts with a newline? */ |
| 303 | inclinenumber(ls); /* skip it */ | 303 | inclinenumber(ls); /* skip it */ |
| 304 | for (;;) { | 304 | for (;;) { |
| @@ -312,7 +312,7 @@ static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) { | |||
| 312 | } | 312 | } |
| 313 | case ']': { | 313 | case ']': { |
| 314 | if (skip_sep(ls) == sep) { | 314 | if (skip_sep(ls) == sep) { |
| 315 | save_and_next(ls); /* skip 2nd `]' */ | 315 | save_and_next(ls); /* skip 2nd ']' */ |
| 316 | goto endloop; | 316 | goto endloop; |
| 317 | } | 317 | } |
| 318 | break; | 318 | break; |
| @@ -480,7 +480,7 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
| 480 | next(ls); | 480 | next(ls); |
| 481 | if (ls->current == '[') { /* long comment? */ | 481 | if (ls->current == '[') { /* long comment? */ |
| 482 | int sep = skip_sep(ls); | 482 | int sep = skip_sep(ls); |
| 483 | luaZ_resetbuffer(ls->buff); /* `skip_sep' may dirty the buffer */ | 483 | luaZ_resetbuffer(ls->buff); /* 'skip_sep' may dirty the buffer */ |
| 484 | if (sep >= 0) { | 484 | if (sep >= 0) { |
| 485 | read_long_string(ls, NULL, sep); /* skip long comment */ | 485 | read_long_string(ls, NULL, sep); /* skip long comment */ |
| 486 | luaZ_resetbuffer(ls->buff); /* previous call may dirty the buff. */ | 486 | luaZ_resetbuffer(ls->buff); /* previous call may dirty the buff. */ |
