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_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_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/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 4336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4347 impl()->ReportMessageAt(class_name_location, | 4347 impl()->ReportMessageAt(class_name_location, |
4348 MessageTemplate::kStrictEvalArguments); | 4348 MessageTemplate::kStrictEvalArguments); |
4349 *ok = false; | 4349 *ok = false; |
4350 return impl()->EmptyExpression(); | 4350 return impl()->EmptyExpression(); |
4351 } | 4351 } |
4352 | 4352 |
4353 BlockState block_state(zone(), &scope_state_); | 4353 BlockState block_state(zone(), &scope_state_); |
4354 RaiseLanguageMode(STRICT); | 4354 RaiseLanguageMode(STRICT); |
4355 | 4355 |
4356 ClassInfo class_info(this); | 4356 ClassInfo class_info(this); |
4357 impl()->DeclareClassVariable(name, block_state.scope(), &class_info, | 4357 impl()->DeclareClassVariable(name, &class_info, class_token_pos, CHECK_OK); |
4358 class_token_pos, CHECK_OK); | |
4359 | 4358 |
4360 if (Check(Token::EXTENDS)) { | 4359 if (Check(Token::EXTENDS)) { |
4361 block_state.set_start_position(scanner()->location().end_pos); | 4360 block_state.set_start_position(scanner()->location().end_pos); |
4362 ExpressionClassifier extends_classifier(this); | 4361 ExpressionClassifier extends_classifier(this); |
4363 class_info.extends = ParseLeftHandSideExpression(CHECK_OK); | 4362 class_info.extends = ParseLeftHandSideExpression(CHECK_OK); |
4364 impl()->RewriteNonPattern(CHECK_OK); | 4363 impl()->RewriteNonPattern(CHECK_OK); |
4365 impl()->AccumulateFormalParameterContainmentErrors(); | 4364 impl()->AccumulateFormalParameterContainmentErrors(); |
4366 } else { | 4365 } else { |
4367 block_state.set_start_position(scanner()->location().end_pos); | 4366 block_state.set_start_position(scanner()->location().end_pos); |
4368 } | 4367 } |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5771 } | 5770 } |
5772 | 5771 |
5773 #undef CHECK_OK | 5772 #undef CHECK_OK |
5774 #undef CHECK_OK_CUSTOM | 5773 #undef CHECK_OK_CUSTOM |
5775 #undef CHECK_OK_VOID | 5774 #undef CHECK_OK_VOID |
5776 | 5775 |
5777 } // namespace internal | 5776 } // namespace internal |
5778 } // namespace v8 | 5777 } // namespace v8 |
5779 | 5778 |
5780 #endif // V8_PARSING_PARSER_BASE_H | 5779 #endif // V8_PARSING_PARSER_BASE_H |
OLD | NEW |