diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 12:27:14 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 12:27:14 -0300 |
| commit | 1b6315ba10e6262b30886edbcad2ab5dec445853 (patch) | |
| tree | a77779a25c797360b38fc38e77321c7291eeba08 | |
| parent | 3b001d9a9ddcd9a7ea75c1d021850f63b3a61ce0 (diff) | |
| download | lua-1b6315ba10e6262b30886edbcad2ab5dec445853.tar.gz lua-1b6315ba10e6262b30886edbcad2ab5dec445853.tar.bz2 lua-1b6315ba10e6262b30886edbcad2ab5dec445853.zip | |
not all unfinished strings with "..." end in EOF
| -rw-r--r-- | llex.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ | 2 | ** $Id: llex.c,v 1.96 2002/02/08 22:40:27 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 | */ |
| @@ -250,7 +250,8 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) { | |||
| 250 | switch (LS->current) { | 250 | switch (LS->current) { |
| 251 | case EOZ: case '\n': | 251 | case EOZ: case '\n': |
| 252 | save(L, '\0', l); | 252 | save(L, '\0', l); |
| 253 | luaX_error(LS, "unfinished string", TK_EOS); | 253 | luaX_error(LS, "unfinished string", |
| 254 | (LS->current == EOZ) ? TK_EOS : TK_STRING); | ||
| 254 | break; /* to avoid warnings */ | 255 | break; /* to avoid warnings */ |
| 255 | case '\\': | 256 | case '\\': |
| 256 | next(LS); /* do not save the `\' */ | 257 | next(LS); /* do not save the `\' */ |
