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_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 // are either being counted in the preparser data, or is important | 1559 // are either being counted in the preparser data, or is important |
1560 // to throw the correct syntax error exceptions. | 1560 // to throw the correct syntax error exceptions. |
1561 | 1561 |
1562 // All ParseXXX functions take as the last argument an *ok parameter | 1562 // All ParseXXX functions take as the last argument an *ok parameter |
1563 // which is set to false if parsing failed; it is unchanged otherwise. | 1563 // which is set to false if parsing failed; it is unchanged otherwise. |
1564 // By making the 'exception handling' explicit, we are forced to check | 1564 // By making the 'exception handling' explicit, we are forced to check |
1565 // for failure at the call sites. | 1565 // for failure at the call sites. |
1566 Statement ParseStatementListItem(bool* ok); | 1566 Statement ParseStatementListItem(bool* ok); |
1567 void ParseStatementList(int end_token, bool* ok); | 1567 void ParseStatementList(int end_token, bool* ok); |
1568 Statement ParseStatement(bool* ok); | 1568 Statement ParseStatement(bool* ok); |
| 1569 Statement ParseSubStatement(bool* ok); |
1569 Statement ParseFunctionDeclaration(bool* ok); | 1570 Statement ParseFunctionDeclaration(bool* ok); |
1570 Statement ParseClassDeclaration(bool* ok); | 1571 Statement ParseClassDeclaration(bool* ok); |
1571 Statement ParseBlock(bool* ok); | 1572 Statement ParseBlock(bool* ok); |
1572 Statement ParseVariableStatement(VariableDeclarationContext var_context, | 1573 Statement ParseVariableStatement(VariableDeclarationContext var_context, |
1573 bool* ok); | 1574 bool* ok); |
1574 Statement ParseVariableDeclarations(VariableDeclarationContext var_context, | 1575 Statement ParseVariableDeclarations(VariableDeclarationContext var_context, |
1575 VariableDeclarationProperties* decl_props, | 1576 VariableDeclarationProperties* decl_props, |
1576 int* num_decl, | 1577 int* num_decl, |
1577 bool* ok); | 1578 bool* ok); |
1578 Statement ParseExpressionOrLabelledStatement(bool* ok); | 1579 Statement ParseExpressionOrLabelledStatement(bool* ok); |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3081 *ok = false; | 3082 *ok = false; |
3082 return; | 3083 return; |
3083 } | 3084 } |
3084 has_seen_constructor_ = true; | 3085 has_seen_constructor_ = true; |
3085 return; | 3086 return; |
3086 } | 3087 } |
3087 } | 3088 } |
3088 } } // v8::internal | 3089 } } // v8::internal |
3089 | 3090 |
3090 #endif // V8_PREPARSER_H | 3091 #endif // V8_PREPARSER_H |
OLD | NEW |