1
0
forked from Mirror/wren

Merge pull request #615 from iwillspeak/repl-escape-fix

Fixup Handling of `\` in REPL to Prevent Crash
This commit is contained in:
Sven Bergström
2019-02-11 22:58:06 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -828,7 +828,7 @@ class Lexer {
if (c == Chars.backslash) {
// TODO: Process specific escapes and validate them.
advance()
if (!isAtEnd) advance()
} else if (c == Chars.percent) {
// Consume the '('.
if (!isAtEnd) advance()

View File

@ -830,7 +830,7 @@ static const char* replModuleSource =
"\n"
" if (c == Chars.backslash) {\n"
" // TODO: Process specific escapes and validate them.\n"
" advance()\n"
" if (!isAtEnd) advance()\n"
" } else if (c == Chars.percent) {\n"
" // Consume the '('.\n"
" if (!isAtEnd) advance()\n"