| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/ast_transformer.h" | 9 #include "vm/ast_transformer.h" |
| 10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
| (...skipping 4617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4628 if (CurrentToken() == Token::kIMPLEMENTS) { | 4628 if (CurrentToken() == Token::kIMPLEMENTS) { |
| 4629 ParseInterfaceList(cls); | 4629 ParseInterfaceList(cls); |
| 4630 } | 4630 } |
| 4631 | 4631 |
| 4632 if (is_patch) { | 4632 if (is_patch) { |
| 4633 // Apply the changes to the patched class looked up above. | 4633 // Apply the changes to the patched class looked up above. |
| 4634 ASSERT(obj.raw() == library_.LookupLocalObject(class_name)); | 4634 ASSERT(obj.raw() == library_.LookupLocalObject(class_name)); |
| 4635 // The patched class must not be finalized yet. | 4635 // The patched class must not be finalized yet. |
| 4636 const Class& orig_class = Class::Cast(obj); | 4636 const Class& orig_class = Class::Cast(obj); |
| 4637 ASSERT(!orig_class.is_finalized()); | 4637 ASSERT(!orig_class.is_finalized()); |
| 4638 orig_class.set_patch_class(cls); | 4638 orig_class.SetPatchClass(cls); |
| 4639 cls.set_is_patch(); | 4639 cls.set_is_patch(); |
| 4640 } | 4640 } |
| 4641 pending_classes.Add(cls, Heap::kOld); | 4641 pending_classes.Add(cls, Heap::kOld); |
| 4642 | 4642 |
| 4643 if (is_mixin_declaration) { | 4643 if (is_mixin_declaration) { |
| 4644 ExpectSemicolon(); | 4644 ExpectSemicolon(); |
| 4645 } else { | 4645 } else { |
| 4646 CheckToken(Token::kLBRACE); | 4646 CheckToken(Token::kLBRACE); |
| 4647 SkipBlock(); | 4647 SkipBlock(); |
| 4648 ExpectToken(Token::kRBRACE); | 4648 ExpectToken(Token::kRBRACE); |
| (...skipping 9655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14304 void Parser::SkipQualIdent() { | 14304 void Parser::SkipQualIdent() { |
| 14305 ASSERT(IsIdentifier()); | 14305 ASSERT(IsIdentifier()); |
| 14306 ConsumeToken(); | 14306 ConsumeToken(); |
| 14307 if (CurrentToken() == Token::kPERIOD) { | 14307 if (CurrentToken() == Token::kPERIOD) { |
| 14308 ConsumeToken(); // Consume the kPERIOD token. | 14308 ConsumeToken(); // Consume the kPERIOD token. |
| 14309 ExpectIdentifier("identifier expected after '.'"); | 14309 ExpectIdentifier("identifier expected after '.'"); |
| 14310 } | 14310 } |
| 14311 } | 14311 } |
| 14312 | 14312 |
| 14313 } // namespace dart | 14313 } // namespace dart |
| OLD | NEW |