| Index: src/scanner.h
|
| diff --git a/src/scanner.h b/src/scanner.h
|
| index e626f206c74952c856d77d55b708b9e01661b1ac..ba0fcdcff9846b43045a7984cc46c5fb8480ae51 100644
|
| --- a/src/scanner.h
|
| +++ b/src/scanner.h
|
| @@ -458,6 +458,8 @@ class Scanner {
|
| void SetHarmonyClasses(bool classes) {
|
| harmony_classes_ = classes;
|
| }
|
| + bool HarmonyUnicode() const { return harmony_unicode_; }
|
| + void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; }
|
|
|
| // Returns true if there was a line terminator before the peek'ed token,
|
| // possibly inside a multi-line comment.
|
| @@ -611,6 +613,10 @@ class Scanner {
|
| }
|
|
|
| uc32 ScanHexNumber(int expected_length);
|
| + // Scan a number of any length but not bigger than max_value. For example, the
|
| + // number can be 000000001, so it's very long in characters but its value is
|
| + // small.
|
| + uc32 ScanUnlimitedLengthHexNumber(int max_value);
|
|
|
| // Scans a single JavaScript token.
|
| void Scan();
|
| @@ -637,6 +643,8 @@ class Scanner {
|
| // Decodes a Unicode escape-sequence which is part of an identifier.
|
| // If the escape sequence cannot be decoded the result is kBadChar.
|
| uc32 ScanIdentifierUnicodeEscape();
|
| + // Helper for the above functions.
|
| + uc32 ScanUnicodeEscape();
|
|
|
| // Return the current source position.
|
| int source_pos() {
|
| @@ -681,6 +689,8 @@ class Scanner {
|
| bool harmony_numeric_literals_;
|
| // Whether we scan 'class', 'extends', 'static' and 'super' as keywords.
|
| bool harmony_classes_;
|
| + // Whether we allow \u{xxxxx}.
|
| + bool harmony_unicode_;
|
| };
|
|
|
| } } // namespace v8::internal
|
|
|