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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 PreParserStatement NewDebuggerStatement(int pos) { | 714 PreParserStatement NewDebuggerStatement(int pos) { |
715 return PreParserStatement::Default(); | 715 return PreParserStatement::Default(); |
716 } | 716 } |
717 | 717 |
718 PreParserStatement NewExpressionStatement(PreParserExpression expr, int pos) { | 718 PreParserStatement NewExpressionStatement(PreParserExpression expr, int pos) { |
719 return PreParserStatement::ExpressionStatement(expr); | 719 return PreParserStatement::ExpressionStatement(expr); |
720 } | 720 } |
721 | 721 |
722 PreParserStatement NewIfStatement(PreParserExpression condition, | 722 PreParserStatement NewIfStatement(PreParserExpression condition, |
723 PreParserStatement then_statement, | 723 PreParserStatement then_statement, |
724 PreParserStatement else_statement, | 724 PreParserStatement else_statement, int pos, |
725 int pos) { | 725 SourceRange then_range = {}, |
| 726 SourceRange else_range = {}) { |
726 // This must return a jump statement iff both clauses are jump statements. | 727 // This must return a jump statement iff both clauses are jump statements. |
727 return else_statement.IsJumpStatement() ? then_statement : else_statement; | 728 return else_statement.IsJumpStatement() ? then_statement : else_statement; |
728 } | 729 } |
729 | 730 |
730 PreParserStatement NewBreakStatement(PreParserStatement target, int pos) { | 731 PreParserStatement NewBreakStatement(PreParserStatement target, int pos) { |
731 return PreParserStatement::Jump(); | 732 return PreParserStatement::Jump(); |
732 } | 733 } |
733 | 734 |
734 PreParserStatement NewContinueStatement(PreParserStatement target, int pos) { | 735 PreParserStatement NewContinueStatement(PreParserStatement target, int pos) { |
735 return PreParserStatement::Jump(); | 736 return PreParserStatement::Jump(); |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, | 1728 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, |
1728 int start, | 1729 int start, |
1729 PreParserExpression tag) { | 1730 PreParserExpression tag) { |
1730 return EmptyExpression(); | 1731 return EmptyExpression(); |
1731 } | 1732 } |
1732 | 1733 |
1733 } // namespace internal | 1734 } // namespace internal |
1734 } // namespace v8 | 1735 } // namespace v8 |
1735 | 1736 |
1736 #endif // V8_PARSING_PREPARSER_H | 1737 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |