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/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/parsing/parser-base.h" | 9 #include "src/parsing/parser-base.h" |
10 | 10 |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 private: | 830 private: |
831 // These types form an algebra over syntactic categories that is just | 831 // These types form an algebra over syntactic categories that is just |
832 // rich enough to let us recognize and propagate the constructs that | 832 // rich enough to let us recognize and propagate the constructs that |
833 // are either being counted in the preparser data, or is important | 833 // are either being counted in the preparser data, or is important |
834 // to throw the correct syntax error exceptions. | 834 // to throw the correct syntax error exceptions. |
835 | 835 |
836 // All ParseXXX functions take as the last argument an *ok parameter | 836 // All ParseXXX functions take as the last argument an *ok parameter |
837 // which is set to false if parsing failed; it is unchanged otherwise. | 837 // which is set to false if parsing failed; it is unchanged otherwise. |
838 // By making the 'exception handling' explicit, we are forced to check | 838 // By making the 'exception handling' explicit, we are forced to check |
839 // for failure at the call sites. | 839 // for failure at the call sites. |
840 Statement ParseFunctionDeclaration(bool* ok); | |
841 Expression ParseConditionalExpression(bool accept_IN, bool* ok); | |
842 Expression ParseObjectLiteral(bool* ok); | |
843 | 840 |
844 V8_INLINE PreParserStatementList ParseEagerFunctionBody( | 841 V8_INLINE PreParserStatementList ParseEagerFunctionBody( |
845 PreParserIdentifier function_name, int pos, | 842 PreParserIdentifier function_name, int pos, |
846 const PreParserFormalParameters& parameters, FunctionKind kind, | 843 const PreParserFormalParameters& parameters, FunctionKind kind, |
847 FunctionLiteral::FunctionType function_type, bool* ok); | 844 FunctionLiteral::FunctionType function_type, bool* ok); |
848 | 845 |
849 V8_INLINE LazyParsingResult SkipLazyFunctionBody( | 846 V8_INLINE LazyParsingResult SkipLazyFunctionBody( |
850 int* materialized_literal_count, int* expected_property_count, | 847 int* materialized_literal_count, int* expected_property_count, |
851 bool track_unresolved_variables, bool may_abort, bool* ok) { | 848 bool track_unresolved_variables, bool may_abort, bool* ok) { |
852 UNREACHABLE(); | 849 UNREACHABLE(); |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 function_state_->NextMaterializedLiteralIndex(); | 1472 function_state_->NextMaterializedLiteralIndex(); |
1476 function_state_->NextMaterializedLiteralIndex(); | 1473 function_state_->NextMaterializedLiteralIndex(); |
1477 } | 1474 } |
1478 return EmptyExpression(); | 1475 return EmptyExpression(); |
1479 } | 1476 } |
1480 | 1477 |
1481 } // namespace internal | 1478 } // namespace internal |
1482 } // namespace v8 | 1479 } // namespace v8 |
1483 | 1480 |
1484 #endif // V8_PARSING_PREPARSER_H | 1481 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |