Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: runtime/vm/parser.cc

Issue 22999022: Report compile-time errors for conflicting overrides as specified by latest (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 ErrorMsg("keyword 'abstract' not allowed in field declaration"); 3115 ErrorMsg("keyword 'abstract' not allowed in field declaration");
3116 } 3116 }
3117 if (field->has_external) { 3117 if (field->has_external) {
3118 ErrorMsg("keyword 'external' not allowed in field declaration"); 3118 ErrorMsg("keyword 'external' not allowed in field declaration");
3119 } 3119 }
3120 if (field->has_factory) { 3120 if (field->has_factory) {
3121 ErrorMsg("keyword 'factory' not allowed in field declaration"); 3121 ErrorMsg("keyword 'factory' not allowed in field declaration");
3122 } 3122 }
3123 if (members->FieldNameExists(*field->name, !field->has_final)) { 3123 if (members->FieldNameExists(*field->name, !field->has_final)) {
3124 ErrorMsg(field->name_pos, 3124 ErrorMsg(field->name_pos,
3125 "'%s' field/method already defined\n", field->name->ToCString()); 3125 "field or method '%s' already defined", field->name->ToCString());
3126 } 3126 }
3127 Function& getter = Function::Handle(); 3127 Function& getter = Function::Handle();
3128 Function& setter = Function::Handle(); 3128 Function& setter = Function::Handle();
3129 Field& class_field = Field::Handle(); 3129 Field& class_field = Field::Handle();
3130 Instance& init_value = Instance::Handle(); 3130 Instance& init_value = Instance::Handle();
3131 while (true) { 3131 while (true) {
3132 bool has_initializer = CurrentToken() == Token::kASSIGN; 3132 bool has_initializer = CurrentToken() == Token::kASSIGN;
3133 bool has_simple_literal = false; 3133 bool has_simple_literal = false;
3134 if (has_initializer) { 3134 if (has_initializer) {
3135 ConsumeToken(); 3135 ConsumeToken();
(...skipping 7191 matching lines...) Expand 10 before | Expand all | Expand 10 after
10327 void Parser::SkipQualIdent() { 10327 void Parser::SkipQualIdent() {
10328 ASSERT(IsIdentifier()); 10328 ASSERT(IsIdentifier());
10329 ConsumeToken(); 10329 ConsumeToken();
10330 if (CurrentToken() == Token::kPERIOD) { 10330 if (CurrentToken() == Token::kPERIOD) {
10331 ConsumeToken(); // Consume the kPERIOD token. 10331 ConsumeToken(); // Consume the kPERIOD token.
10332 ExpectIdentifier("identifier expected after '.'"); 10332 ExpectIdentifier("identifier expected after '.'");
10333 } 10333 }
10334 } 10334 }
10335 10335
10336 } // namespace dart 10336 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698