aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-22 15:59:59 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-22 15:59:59 -0300
commit5f37134e64aec3a0414a41c11d6b055c667369d1 (patch)
tree29415835aca3bc8bfe31c9e4c03d894ac6bcef09 /llex.c
parent52ee91dd73199e068d31d3ac138d933ddd4fb9b1 (diff)
downloadlua-5f37134e64aec3a0414a41c11d6b055c667369d1.tar.gz
lua-5f37134e64aec3a0414a41c11d6b055c667369d1.tar.bz2
lua-5f37134e64aec3a0414a41c11d6b055c667369d1.zip
avoid '...' and "..." inside comments
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/llex.c b/llex.c
index 5ed43493..386ea316 100644
--- a/llex.c
+++ b/llex.c
@@ -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
91static void inclinenumber (LexState *LS) { 91static 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;