refactor: remove some facades (#12731)

This commit is contained in:
Victor Berchet
2016-11-08 15:43:24 -08:00
committed by vikerman
parent acbf1d859c
commit 7694f974af
4 changed files with 22 additions and 90 deletions

View File

@ -296,9 +296,9 @@ class _Scanner {
if (this.peek == chars.$u) {
// 4 character hex code for unicode character.
const hex: string = input.substring(this.index + 1, this.index + 5);
try {
unescapedCode = NumberWrapper.parseInt(hex, 16);
} catch (e) {
if (/^[0-9a-f]+$/i.test(hex)) {
unescapedCode = parseInt(hex, 16);
} else {
return this.error(`Invalid unicode escape [\\u${hex}]`, 0);
}
for (let i: number = 0; i < 5; i++) {