OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 RuntimeCallStats* runtime_call_stats, | 885 RuntimeCallStats* runtime_call_stats, |
886 bool parsing_on_main_thread = true) | 886 bool parsing_on_main_thread = true) |
887 : ParserBase<PreParser>(zone, scanner, stack_limit, nullptr, | 887 : ParserBase<PreParser>(zone, scanner, stack_limit, nullptr, |
888 ast_value_factory, runtime_call_stats, | 888 ast_value_factory, runtime_call_stats, |
889 parsing_on_main_thread), | 889 parsing_on_main_thread), |
890 use_counts_(nullptr), | 890 use_counts_(nullptr), |
891 preparse_data_(FLAG_use_parse_tasks ? new PreParseData() : nullptr), | 891 preparse_data_(FLAG_use_parse_tasks ? new PreParseData() : nullptr), |
892 track_unresolved_variables_(false), | 892 track_unresolved_variables_(false), |
893 pending_error_handler_(pending_error_handler) {} | 893 pending_error_handler_(pending_error_handler) {} |
894 | 894 |
895 static bool const IsPreParser() { return true; } | 895 static bool IsPreParser() { return true; } |
896 | 896 |
897 PreParserLogger* logger() { return &log_; } | 897 PreParserLogger* logger() { return &log_; } |
898 | 898 |
899 // Pre-parse the program from the character stream; returns true on | 899 // Pre-parse the program from the character stream; returns true on |
900 // success (even if parsing failed, the pre-parse data successfully | 900 // success (even if parsing failed, the pre-parse data successfully |
901 // captured the syntax error), and false if a stack-overflow happened | 901 // captured the syntax error), and false if a stack-overflow happened |
902 // during parsing. | 902 // during parsing. |
903 PreParseResult PreParseProgram(bool is_module = false); | 903 PreParseResult PreParseProgram(bool is_module = false); |
904 | 904 |
905 // Parses a single function literal, from the opening parentheses before | 905 // Parses a single function literal, from the opening parentheses before |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1677 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, | 1677 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, |
1678 int start, | 1678 int start, |
1679 PreParserExpression tag) { | 1679 PreParserExpression tag) { |
1680 return EmptyExpression(); | 1680 return EmptyExpression(); |
1681 } | 1681 } |
1682 | 1682 |
1683 } // namespace internal | 1683 } // namespace internal |
1684 } // namespace v8 | 1684 } // namespace v8 |
1685 | 1685 |
1686 #endif // V8_PARSING_PREPARSER_H | 1686 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |