diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-22 15:59:59 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-22 15:59:59 -0300 |
commit | 5f37134e64aec3a0414a41c11d6b055c667369d1 (patch) | |
tree | 29415835aca3bc8bfe31c9e4c03d894ac6bcef09 /llex.c | |
parent | 52ee91dd73199e068d31d3ac138d933ddd4fb9b1 (diff) | |
download | lua-5f37134e64aec3a0414a41c11d6b055c667369d1.tar.gz lua-5f37134e64aec3a0414a41c11d6b055c667369d1.tar.bz2 lua-5f37134e64aec3a0414a41c11d6b055c667369d1.zip |
avoid '...' and "..." inside comments
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 1.77 2001/02/09 20:22:29 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.78 2001/02/22 17:15:18 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 | */ |
@@ -89,7 +89,7 @@ static void luaX_invalidchar (LexState *ls, int c) { | |||
89 | 89 | ||
90 | 90 | ||
91 | static void inclinenumber (LexState *LS) { | 91 | static void inclinenumber (LexState *LS) { |
92 | next(LS); /* skip '\n' */ | 92 | next(LS); /* skip `\n' */ |
93 | ++LS->linenumber; | 93 | ++LS->linenumber; |
94 | luaX_checklimit(LS, LS->linenumber, MAX_INT, "lines in a chunk"); | 94 | luaX_checklimit(LS, LS->linenumber, MAX_INT, "lines in a chunk"); |
95 | } | 95 | } |
@@ -167,7 +167,7 @@ static void read_number (LexState *LS, int comma, SemInfo *seminfo) { | |||
167 | save_and_next(L, LS, l); | 167 | save_and_next(L, LS, l); |
168 | } | 168 | } |
169 | if (LS->current == 'e' || LS->current == 'E') { | 169 | if (LS->current == 'e' || LS->current == 'E') { |
170 | save_and_next(L, LS, l); /* read 'E' */ | 170 | save_and_next(L, LS, l); /* read `E' */ |
171 | if (LS->current == '+' || LS->current == '-') | 171 | if (LS->current == '+' || LS->current == '-') |
172 | save_and_next(L, LS, l); /* optional exponent sign */ | 172 | save_and_next(L, LS, l); /* optional exponent sign */ |
173 | while (isdigit(LS->current)) { | 173 | while (isdigit(LS->current)) { |
@@ -186,8 +186,8 @@ static void read_long_string (LexState *LS, SemInfo *seminfo) { | |||
186 | int cont = 0; | 186 | int cont = 0; |
187 | size_t l = 0; | 187 | size_t l = 0; |
188 | checkbuffer(L, 10, l); | 188 | checkbuffer(L, 10, l); |
189 | save(L, '[', l); /* save first '[' */ | 189 | save(L, '[', l); /* save first `[' */ |
190 | save_and_next(L, LS, l); /* pass the second '[' */ | 190 | save_and_next(L, LS, l); /* pass the second `[' */ |
191 | for (;;) { | 191 | for (;;) { |
192 | checkbuffer(L, 10, l); | 192 | checkbuffer(L, 10, l); |
193 | switch (LS->current) { | 193 | switch (LS->current) { |
@@ -218,7 +218,7 @@ static void read_long_string (LexState *LS, SemInfo *seminfo) { | |||
218 | save_and_next(L, LS, l); | 218 | save_and_next(L, LS, l); |
219 | } | 219 | } |
220 | } endloop: | 220 | } endloop: |
221 | save_and_next(L, LS, l); /* skip the second ']' */ | 221 | save_and_next(L, LS, l); /* skip the second `]' */ |
222 | save(L, '\0', l); | 222 | save(L, '\0', l); |
223 | seminfo->ts = luaS_newlstr(L, G(L)->Mbuffer+2, l-5); | 223 | seminfo->ts = luaS_newlstr(L, G(L)->Mbuffer+2, l-5); |
224 | } | 224 | } |
@@ -237,7 +237,7 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) { | |||
237 | luaX_error(LS, "unfinished string", TK_STRING); | 237 | luaX_error(LS, "unfinished string", TK_STRING); |
238 | break; /* to avoid warnings */ | 238 | break; /* to avoid warnings */ |
239 | case '\\': | 239 | case '\\': |
240 | next(LS); /* do not save the '\' */ | 240 | next(LS); /* do not save the `\' */ |
241 | switch (LS->current) { | 241 | switch (LS->current) { |
242 | case 'a': save(L, '\a', l); next(LS); break; | 242 | case 'a': save(L, '\a', l); next(LS); break; |
243 | case 'b': save(L, '\b', l); next(LS); break; | 243 | case 'b': save(L, '\b', l); next(LS); break; |