diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-07 09:49:37 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-07 09:49:37 -0300 |
| commit | f81b8adb3f2738d2895511082793af622e8581d8 (patch) | |
| tree | 035bcb1cf293e5ef63e35327665c5c316c1d0b6a | |
| parent | 2b2267069bcd2f214fa47786364653f5522d9529 (diff) | |
| download | lua-f81b8adb3f2738d2895511082793af622e8581d8.tar.gz lua-f81b8adb3f2738d2895511082793af622e8581d8.tar.bz2 lua-f81b8adb3f2738d2895511082793af622e8581d8.zip | |
string [[...]] ignores initial \n
Diffstat (limited to '')
| -rw-r--r-- | llex.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 1.81 2001/02/23 20:32:16 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.82 2001/03/06 14:46:54 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 | */ |
| @@ -194,6 +194,8 @@ static void read_long_string (LexState *LS, SemInfo *seminfo) { | |||
| 194 | checkbuffer(L, 10, l); | 194 | checkbuffer(L, 10, l); |
| 195 | save(L, l_c('['), l); /* save first `[' */ | 195 | save(L, l_c('['), l); /* save first `[' */ |
| 196 | save_and_next(L, LS, l); /* pass the second `[' */ | 196 | save_and_next(L, LS, l); /* pass the second `[' */ |
| 197 | if (LS->current == l_c('\n')) /* string starts with a newline? */ | ||
| 198 | inclinenumber(LS); /* skip it */ | ||
| 197 | for (;;) { | 199 | for (;;) { |
| 198 | checkbuffer(L, 10, l); | 200 | checkbuffer(L, 10, l); |
| 199 | switch (LS->current) { | 201 | switch (LS->current) { |
