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/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 PreParserExpressionList args, | 931 PreParserExpressionList args, |
932 int pos); | 932 int pos); |
933 | 933 |
934 inline void RewriteDestructuringAssignments() {} | 934 inline void RewriteDestructuringAssignments() {} |
935 | 935 |
936 inline void QueueDestructuringAssignmentForRewriting(PreParserExpression) {} | 936 inline void QueueDestructuringAssignmentForRewriting(PreParserExpression) {} |
937 | 937 |
938 void SetFunctionNameFromPropertyName(PreParserExpression, | 938 void SetFunctionNameFromPropertyName(PreParserExpression, |
939 PreParserIdentifier) {} | 939 PreParserIdentifier) {} |
940 | 940 |
941 inline PreParserExpression RewriteExpression( | 941 inline PreParserExpression RewriteNonPattern( |
942 PreParserExpression expr, const ExpressionClassifier* classifier, | 942 PreParserExpression expr, const ExpressionClassifier* classifier, |
943 bool* ok); | 943 bool* ok); |
944 inline PreParserExpression RewriteObjectLiteralProperty( | 944 inline PreParserExpression RewriteObjectLiteralProperty( |
945 PreParserExpression property, const ExpressionClassifier* classifier, | 945 PreParserExpression property, const ExpressionClassifier* classifier, |
946 bool* ok); | 946 bool* ok); |
947 | 947 |
948 private: | 948 private: |
949 PreParser* pre_parser_; | 949 PreParser* pre_parser_; |
950 }; | 950 }; |
951 | 951 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect parameter | 1119 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect parameter |
1120 // lists that are too long. | 1120 // lists that are too long. |
1121 } | 1121 } |
1122 | 1122 |
1123 | 1123 |
1124 PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) { | 1124 PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) { |
1125 return pre_parser_->ParseDoExpression(ok); | 1125 return pre_parser_->ParseDoExpression(ok); |
1126 } | 1126 } |
1127 | 1127 |
1128 | 1128 |
1129 PreParserExpression PreParserTraits::RewriteExpression( | 1129 PreParserExpression PreParserTraits::RewriteNonPattern( |
1130 PreParserExpression expr, const ExpressionClassifier* classifier, | 1130 PreParserExpression expr, const ExpressionClassifier* classifier, |
1131 bool* ok) { | 1131 bool* ok) { |
1132 pre_parser_->ValidateExpression(classifier, ok); | 1132 pre_parser_->ValidateExpression(classifier, ok); |
1133 return expr; | 1133 return expr; |
1134 } | 1134 } |
1135 | 1135 |
1136 | 1136 |
1137 PreParserExpression PreParserTraits::RewriteObjectLiteralProperty( | 1137 PreParserExpression PreParserTraits::RewriteObjectLiteralProperty( |
1138 PreParserExpression property, const ExpressionClassifier* classifier, | 1138 PreParserExpression property, const ExpressionClassifier* classifier, |
1139 bool* ok) { | 1139 bool* ok) { |
(...skipping 21 matching lines...) Expand all Loading... |
1161 const PreParserFormalParameters& parameters, FunctionKind kind, | 1161 const PreParserFormalParameters& parameters, FunctionKind kind, |
1162 FunctionLiteral::FunctionType function_type, bool* ok) { | 1162 FunctionLiteral::FunctionType function_type, bool* ok) { |
1163 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1163 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1164 kind, function_type, ok); | 1164 kind, function_type, ok); |
1165 } | 1165 } |
1166 | 1166 |
1167 } // namespace internal | 1167 } // namespace internal |
1168 } // namespace v8 | 1168 } // namespace v8 |
1169 | 1169 |
1170 #endif // V8_PARSING_PREPARSER_H | 1170 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |