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
+1 -1
View File
@@ -828,7 +828,7 @@ class Lexer {
if (c == Chars.backslash) { if (c == Chars.backslash) {
// TODO: Process specific escapes and validate them. // TODO: Process specific escapes and validate them.
advance() if (!isAtEnd) advance()
} else if (c == Chars.percent) { } else if (c == Chars.percent) {
// Consume the '('. // Consume the '('.
if (!isAtEnd) advance() if (!isAtEnd) advance()
+1 -1
View File
@@ -830,7 +830,7 @@ static const char* replModuleSource =
"\n" "\n"
" if (c == Chars.backslash) {\n" " if (c == Chars.backslash) {\n"
" // TODO: Process specific escapes and validate them.\n" " // TODO: Process specific escapes and validate them.\n"
" advance()\n" " if (!isAtEnd) advance()\n"
" } else if (c == Chars.percent) {\n" " } else if (c == Chars.percent) {\n"
" // Consume the '('.\n" " // Consume the '('.\n"
" if (!isAtEnd) advance()\n" " if (!isAtEnd) advance()\n"