| 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/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 4477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4488 all_interfaces.Add(interface); | 4488 all_interfaces.Add(interface); |
| 4489 } while (CurrentToken() == Token::kCOMMA); | 4489 } while (CurrentToken() == Token::kCOMMA); |
| 4490 cls_interfaces = Array::MakeArray(all_interfaces); | 4490 cls_interfaces = Array::MakeArray(all_interfaces); |
| 4491 cls.set_interfaces(cls_interfaces); | 4491 cls.set_interfaces(cls_interfaces); |
| 4492 } | 4492 } |
| 4493 | 4493 |
| 4494 | 4494 |
| 4495 RawAbstractType* Parser::ParseMixins(const AbstractType& super_type) { | 4495 RawAbstractType* Parser::ParseMixins(const AbstractType& super_type) { |
| 4496 TRACE_PARSER("ParseMixins"); | 4496 TRACE_PARSER("ParseMixins"); |
| 4497 ASSERT(CurrentToken() == Token::kWITH); | 4497 ASSERT(CurrentToken() == Token::kWITH); |
| 4498 ASSERT(super_type.IsType()); // TODO(regis): Could be a BoundedType. | |
| 4499 const GrowableObjectArray& mixin_types = | 4498 const GrowableObjectArray& mixin_types = |
| 4500 GrowableObjectArray::Handle(GrowableObjectArray::New()); | 4499 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 4501 AbstractType& mixin_type = AbstractType::Handle(); | 4500 AbstractType& mixin_type = AbstractType::Handle(); |
| 4502 do { | 4501 do { |
| 4503 ConsumeToken(); | 4502 ConsumeToken(); |
| 4504 mixin_type = ParseType(ClassFinalizer::kResolveTypeParameters); | 4503 mixin_type = ParseType(ClassFinalizer::kResolveTypeParameters); |
| 4505 if (mixin_type.IsDynamicType()) { | 4504 if (mixin_type.IsDynamicType()) { |
| 4506 // The string 'dynamic' is not resolved yet at this point, but a malformed | 4505 // The string 'dynamic' is not resolved yet at this point, but a malformed |
| 4507 // type mapped to dynamic can be encountered here. | 4506 // type mapped to dynamic can be encountered here. |
| 4508 ErrorMsg(mixin_type.token_pos(), "illegal mixin of a malformed type"); | 4507 ErrorMsg(mixin_type.token_pos(), "illegal mixin of a malformed type"); |
| (...skipping 6242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10751 void Parser::SkipQualIdent() { | 10750 void Parser::SkipQualIdent() { |
| 10752 ASSERT(IsIdentifier()); | 10751 ASSERT(IsIdentifier()); |
| 10753 ConsumeToken(); | 10752 ConsumeToken(); |
| 10754 if (CurrentToken() == Token::kPERIOD) { | 10753 if (CurrentToken() == Token::kPERIOD) { |
| 10755 ConsumeToken(); // Consume the kPERIOD token. | 10754 ConsumeToken(); // Consume the kPERIOD token. |
| 10756 ExpectIdentifier("identifier expected after '.'"); | 10755 ExpectIdentifier("identifier expected after '.'"); |
| 10757 } | 10756 } |
| 10758 } | 10757 } |
| 10759 | 10758 |
| 10760 } // namespace dart | 10759 } // namespace dart |
| OLD | NEW |