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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 Token::Value SkipSingleLineComment(); | 691 Token::Value SkipSingleLineComment(); |
692 Token::Value SkipSourceURLComment(); | 692 Token::Value SkipSourceURLComment(); |
693 void TryToParseSourceURLComment(); | 693 void TryToParseSourceURLComment(); |
694 Token::Value SkipMultiLineComment(); | 694 Token::Value SkipMultiLineComment(); |
695 // Scans a possible HTML comment -- begins with '<!'. | 695 // Scans a possible HTML comment -- begins with '<!'. |
696 Token::Value ScanHtmlComment(); | 696 Token::Value ScanHtmlComment(); |
697 | 697 |
698 void ScanDecimalDigits(); | 698 void ScanDecimalDigits(); |
699 Token::Value ScanNumber(bool seen_period); | 699 Token::Value ScanNumber(bool seen_period); |
700 Token::Value ScanIdentifierOrKeyword(); | 700 Token::Value ScanIdentifierOrKeyword(); |
701 Token::Value ScanIdentifierSuffix(LiteralScope* literal); | 701 Token::Value ScanIdentifierOrKeywordSuffix(LiteralScope* literal); |
702 | 702 |
703 Token::Value ScanString(); | 703 Token::Value ScanString(); |
704 | 704 |
705 // Scans an escape-sequence which is part of a string and adds the | 705 // Scans an escape-sequence which is part of a string and adds the |
706 // decoded character to the current literal. Returns true if a pattern | 706 // decoded character to the current literal. Returns true if a pattern |
707 // is scanned. | 707 // is scanned. |
708 template <bool capture_raw, bool in_template_literal> | 708 template <bool capture_raw, bool in_template_literal> |
709 bool ScanEscape(); | 709 bool ScanEscape(); |
710 | 710 |
711 // Decodes a Unicode escape-sequence which is part of an identifier. | 711 // Decodes a Unicode escape-sequence which is part of an identifier. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 // inside multiline comments. | 785 // inside multiline comments. |
786 bool has_line_terminator_before_next_; | 786 bool has_line_terminator_before_next_; |
787 // Whether there is a multi-line comment that contains a | 787 // Whether there is a multi-line comment that contains a |
788 // line-terminator after the current token, and before the next. | 788 // line-terminator after the current token, and before the next. |
789 bool has_multiline_comment_before_next_; | 789 bool has_multiline_comment_before_next_; |
790 }; | 790 }; |
791 | 791 |
792 } } // namespace v8::internal | 792 } } // namespace v8::internal |
793 | 793 |
794 #endif // V8_SCANNER_H_ | 794 #endif // V8_SCANNER_H_ |
OLD | NEW |