From 1b6315ba10e6262b30886edbcad2ab5dec445853 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 4 Mar 2002 12:27:14 -0300 Subject: [PATCH] not all unfinished strings with "..." end in EOF --- llex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llex.c b/llex.c index 8f70ff5a..984b447c 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ +** $Id: llex.c,v 1.96 2002/02/08 22:40:27 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -250,7 +250,8 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) { switch (LS->current) { case EOZ: case '\n': save(L, '\0', l); - luaX_error(LS, "unfinished string", TK_EOS); + luaX_error(LS, "unfinished string", + (LS->current == EOZ) ? TK_EOS : TK_STRING); break; /* to avoid warnings */ case '\\': next(LS); /* do not save the `\' */