| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Features shared by parsing and pre-parsing scanners. | 5 // Features shared by parsing and pre-parsing scanners. |
| 6 | 6 |
| 7 #ifndef V8_SCANNER_H_ | 7 #ifndef V8_SCANNER_H_ |
| 8 #define V8_SCANNER_H_ | 8 #define V8_SCANNER_H_ |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 bool ScanRegExpPattern(bool seen_equal); | 451 bool ScanRegExpPattern(bool seen_equal); |
| 452 // Returns true if regexp flags are scanned (always since flags can | 452 // Returns true if regexp flags are scanned (always since flags can |
| 453 // be empty). | 453 // be empty). |
| 454 bool ScanRegExpFlags(); | 454 bool ScanRegExpFlags(); |
| 455 | 455 |
| 456 const LiteralBuffer* source_url() const { return &source_url_; } | 456 const LiteralBuffer* source_url() const { return &source_url_; } |
| 457 const LiteralBuffer* source_mapping_url() const { | 457 const LiteralBuffer* source_mapping_url() const { |
| 458 return &source_mapping_url_; | 458 return &source_mapping_url_; |
| 459 } | 459 } |
| 460 | 460 |
| 461 bool IdentifierIsFutureStrictReserved(const AstRawString* string) const; |
| 462 |
| 461 private: | 463 private: |
| 462 // The current and look-ahead token. | 464 // The current and look-ahead token. |
| 463 struct TokenDesc { | 465 struct TokenDesc { |
| 464 Token::Value token; | 466 Token::Value token; |
| 465 Location location; | 467 Location location; |
| 466 LiteralBuffer* literal_chars; | 468 LiteralBuffer* literal_chars; |
| 467 }; | 469 }; |
| 468 | 470 |
| 469 static const int kCharacterLookaheadBufferSize = 1; | 471 static const int kCharacterLookaheadBufferSize = 1; |
| 470 | 472 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 bool harmony_scoping_; | 645 bool harmony_scoping_; |
| 644 // Whether we scan 'module', 'import', 'export' as keywords. | 646 // Whether we scan 'module', 'import', 'export' as keywords. |
| 645 bool harmony_modules_; | 647 bool harmony_modules_; |
| 646 // Whether we scan 0o777 and 0b111 as numbers. | 648 // Whether we scan 0o777 and 0b111 as numbers. |
| 647 bool harmony_numeric_literals_; | 649 bool harmony_numeric_literals_; |
| 648 }; | 650 }; |
| 649 | 651 |
| 650 } } // namespace v8::internal | 652 } } // namespace v8::internal |
| 651 | 653 |
| 652 #endif // V8_SCANNER_H_ | 654 #endif // V8_SCANNER_H_ |
| OLD | NEW |