Lines 1490-1497
Link Here
|
1490 |
this.currentCharacter = this.source[this.currentPosition++]; |
1490 |
this.currentCharacter = this.source[this.currentPosition++]; |
1491 |
} |
1491 |
} |
1492 |
// we need to compute the escape character in a separate buffer |
1492 |
// we need to compute the escape character in a separate buffer |
1493 |
scanEscapeCharacter(); |
1493 |
if (scanEscapeCharacter() && this.withoutUnicodePtr != 0) { |
1494 |
if (this.withoutUnicodePtr != 0) { |
|
|
1495 |
unicodeStore(); |
1494 |
unicodeStore(); |
1496 |
} |
1495 |
} |
1497 |
} |
1496 |
} |
Lines 2723-2729
Link Here
|
2723 |
this.currentNonWhitespaceToken=currentNonWSToken; |
2722 |
this.currentNonWhitespaceToken=currentNonWSToken; |
2724 |
} |
2723 |
} |
2725 |
|
2724 |
|
2726 |
public final void scanEscapeCharacter() throws InvalidInputException { |
2725 |
|
|
|
2726 |
|
2727 |
/** |
2728 |
* Processes an escaped character sequence on the current source position. |
2729 |
* @return Whether a character was produced. Thus, false in case of a string line continuation. |
2730 |
* @throws InvalidInputException |
2731 |
*/ |
2732 |
public final boolean scanEscapeCharacter() throws InvalidInputException { |
2727 |
// the string with "\\u" is a legal string of two chars \ and u |
2733 |
// the string with "\\u" is a legal string of two chars \ and u |
2728 |
//thus we use a direct access to the source (for regular cases). |
2734 |
//thus we use a direct access to the source (for regular cases). |
2729 |
switch (this.currentCharacter) { |
2735 |
switch (this.currentCharacter) { |
Lines 2751-2756
Link Here
|
2751 |
case '\\' : |
2757 |
case '\\' : |
2752 |
this.currentCharacter = '\\'; |
2758 |
this.currentCharacter = '\\'; |
2753 |
break; |
2759 |
break; |
|
|
2760 |
case '\r': |
2761 |
if (this.source[this.currentPosition] == '\n') |
2762 |
this.currentPosition++; |
2763 |
case '\n': |
2764 |
case '\u2029': |
2765 |
case '\u2028': |
2766 |
return false; |
2754 |
case 'x' : |
2767 |
case 'x' : |
2755 |
int digit1 = ScannerHelper.digit(this.source[this.currentPosition], 16); |
2768 |
int digit1 = ScannerHelper.digit(this.source[this.currentPosition], 16); |
2756 |
int digit2 = ScannerHelper.digit(this.source[this.currentPosition + 1], 16); |
2769 |
int digit2 = ScannerHelper.digit(this.source[this.currentPosition + 1], 16); |
Lines 2801-2806
Link Here
|
2801 |
// in JavaScript when a backslash followed by character, the |
2814 |
// in JavaScript when a backslash followed by character, the |
2802 |
// backslash is ignored. |
2815 |
// backslash is ignored. |
2803 |
} |
2816 |
} |
|
|
2817 |
return true; |
2804 |
} |
2818 |
} |
2805 |
|
2819 |
|
2806 |
public int scanIdentifierOrKeywordWithBoundCheck() { |
2820 |
public int scanIdentifierOrKeywordWithBoundCheck() { |
Lines 4375-4382
Link Here
|
4375 |
this.currentCharacter = this.source[this.currentPosition++]; |
4389 |
this.currentCharacter = this.source[this.currentPosition++]; |
4376 |
} |
4390 |
} |
4377 |
// we need to compute the escape character in a separate buffer |
4391 |
// we need to compute the escape character in a separate buffer |
4378 |
scanEscapeCharacter(); |
4392 |
if (scanEscapeCharacter() && this.withoutUnicodePtr != 0) { |
4379 |
if (this.withoutUnicodePtr != 0) { |
|
|
4380 |
unicodeStore(); |
4393 |
unicodeStore(); |
4381 |
} |
4394 |
} |
4382 |
} |
4395 |
} |