| 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 10281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10292 primary = ParseNewOperator(Token::kCONST); | 10292 primary = ParseNewOperator(Token::kCONST); |
| 10293 } | 10293 } |
| 10294 } else if (CurrentToken() == Token::kLT || | 10294 } else if (CurrentToken() == Token::kLT || |
| 10295 CurrentToken() == Token::kLBRACK || | 10295 CurrentToken() == Token::kLBRACK || |
| 10296 CurrentToken() == Token::kINDEX || | 10296 CurrentToken() == Token::kINDEX || |
| 10297 CurrentToken() == Token::kLBRACE) { | 10297 CurrentToken() == Token::kLBRACE) { |
| 10298 primary = ParseCompoundLiteral(); | 10298 primary = ParseCompoundLiteral(); |
| 10299 } else if (CurrentToken() == Token::kHASH) { | 10299 } else if (CurrentToken() == Token::kHASH) { |
| 10300 primary = ParseSymbolLiteral(); | 10300 primary = ParseSymbolLiteral(); |
| 10301 } else if (CurrentToken() == Token::kSUPER) { | 10301 } else if (CurrentToken() == Token::kSUPER) { |
| 10302 if (parsing_metadata_) { |
| 10303 ErrorMsg("cannot access superclass from metadata"); |
| 10304 } |
| 10302 if (current_function().is_static()) { | 10305 if (current_function().is_static()) { |
| 10303 ErrorMsg("cannot access superclass from static method"); | 10306 ErrorMsg("cannot access superclass from static method"); |
| 10304 } | 10307 } |
| 10305 if (current_class().SuperClass() == Class::null()) { | 10308 if (current_class().SuperClass() == Class::null()) { |
| 10306 ErrorMsg("class '%s' does not have a superclass", | 10309 ErrorMsg("class '%s' does not have a superclass", |
| 10307 String::Handle(current_class().Name()).ToCString()); | 10310 String::Handle(current_class().Name()).ToCString()); |
| 10308 } | 10311 } |
| 10309 if (current_class().IsMixinApplication()) { | 10312 if (current_class().IsMixinApplication()) { |
| 10310 const Type& mixin_type = Type::Handle(current_class().mixin()); | 10313 const Type& mixin_type = Type::Handle(current_class().mixin()); |
| 10311 if (mixin_type.type_class() == current_function().origin()) { | 10314 if (mixin_type.type_class() == current_function().origin()) { |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10692 void Parser::SkipQualIdent() { | 10695 void Parser::SkipQualIdent() { |
| 10693 ASSERT(IsIdentifier()); | 10696 ASSERT(IsIdentifier()); |
| 10694 ConsumeToken(); | 10697 ConsumeToken(); |
| 10695 if (CurrentToken() == Token::kPERIOD) { | 10698 if (CurrentToken() == Token::kPERIOD) { |
| 10696 ConsumeToken(); // Consume the kPERIOD token. | 10699 ConsumeToken(); // Consume the kPERIOD token. |
| 10697 ExpectIdentifier("identifier expected after '.'"); | 10700 ExpectIdentifier("identifier expected after '.'"); |
| 10698 } | 10701 } |
| 10699 } | 10702 } |
| 10700 | 10703 |
| 10701 } // namespace dart | 10704 } // namespace dart |
| OLD | NEW |