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 | |
463 private: | 461 private: |
464 // The current and look-ahead token. | 462 // The current and look-ahead token. |
465 struct TokenDesc { | 463 struct TokenDesc { |
466 Token::Value token; | 464 Token::Value token; |
467 Location location; | 465 Location location; |
468 LiteralBuffer* literal_chars; | 466 LiteralBuffer* literal_chars; |
469 }; | 467 }; |
470 | 468 |
471 static const int kCharacterLookaheadBufferSize = 1; | 469 static const int kCharacterLookaheadBufferSize = 1; |
472 | 470 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 bool harmony_scoping_; | 643 bool harmony_scoping_; |
646 // Whether we scan 'module', 'import', 'export' as keywords. | 644 // Whether we scan 'module', 'import', 'export' as keywords. |
647 bool harmony_modules_; | 645 bool harmony_modules_; |
648 // Whether we scan 0o777 and 0b111 as numbers. | 646 // Whether we scan 0o777 and 0b111 as numbers. |
649 bool harmony_numeric_literals_; | 647 bool harmony_numeric_literals_; |
650 }; | 648 }; |
651 | 649 |
652 } } // namespace v8::internal | 650 } } // namespace v8::internal |
653 | 651 |
654 #endif // V8_SCANNER_H_ | 652 #endif // V8_SCANNER_H_ |
OLD | NEW |