Move OctalEscapeSequence to read_escape_char

This should simplify and improve implementation, make it easier to
implement template strings, and keep master a bit more in sync with
harmony.

Previous implementation wasn't broken, though the loop gave me the
impression it could read infinite numbers and annoyed me a bit. It was
also slightly unnecessary because the lookup involved only 3 characters.
This commit is contained in:
Anthony Van de Gejuchte
2016-06-23 16:53:48 +02:00
committed by Richard van Velzen
parent 9676167aac
commit 3a7d53f3cf
3 changed files with 30 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ describe("String literals", function() {
var error = function(e) {
return e instanceof UglifyJS.JS_Parse_Error &&
e.message === "Octal literals are not allowed in strict mode";
e.message === "SyntaxError: Octal literals are not allowed in strict mode";
}
for (var input in inputs) {