|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
-** $Id: llex.c,v 2.20 2006/03/09 18:14:31 roberto Exp roberto $
|
|
|
+** $Id: llex.c,v 2.21 2006/07/11 15:53:29 roberto Exp roberto $
|
|
|
** Lexical Analyzer
|
|
|
** See Copyright Notice in lua.h
|
|
|
*/
|
|
@@ -222,8 +222,6 @@ static int skip_sep (LexState *ls) {
|
|
|
|
|
|
|
|
|
static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) {
|
|
|
- int cont = 0;
|
|
|
- (void)(cont); /* avoid warnings when `cont' is not used */
|
|
|
save_and_next(ls); /* skip 2nd `[' */
|
|
|
if (currIsNewline(ls)) /* string starts with a newline? */
|
|
|
inclinenumber(ls); /* skip it */
|
|
@@ -233,26 +231,9 @@ static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) {
|
|
|
luaX_lexerror(ls, (seminfo) ? "unfinished long string" :
|
|
|
"unfinished long comment", TK_EOS);
|
|
|
break; /* to avoid warnings */
|
|
|
-#if defined(LUA_COMPAT_LSTR)
|
|
|
- case '[': {
|
|
|
- if (skip_sep(ls) == sep) {
|
|
|
- save_and_next(ls); /* skip 2nd `[' */
|
|
|
- cont++;
|
|
|
-#if LUA_COMPAT_LSTR == 1
|
|
|
- if (sep == 0)
|
|
|
- luaX_lexerror(ls, "nesting of [[...]] is deprecated", '[');
|
|
|
-#endif
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-#endif
|
|
|
case ']': {
|
|
|
if (skip_sep(ls) == sep) {
|
|
|
save_and_next(ls); /* skip 2nd `]' */
|
|
|
-#if defined(LUA_COMPAT_LSTR) && LUA_COMPAT_LSTR == 2
|
|
|
- cont--;
|
|
|
- if (sep == 0 && cont >= 0) break;
|
|
|
-#endif
|
|
|
goto endloop;
|
|
|
}
|
|
|
break;
|