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

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

Issue 9117025: Change error message (and not the internal method names) to report 'final field' instead of 'cons... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 if (initializers->NodeAt(i)->IsStoreInstanceFieldNode()) { 1342 if (initializers->NodeAt(i)->IsStoreInstanceFieldNode()) {
1343 StoreInstanceFieldNode* initializer = 1343 StoreInstanceFieldNode* initializer =
1344 initializers->NodeAt(i)->AsStoreInstanceFieldNode(); 1344 initializers->NodeAt(i)->AsStoreInstanceFieldNode();
1345 if (initializer->field().raw() == field.raw()) { 1345 if (initializer->field().raw() == field.raw()) {
1346 found = true; 1346 found = true;
1347 break; 1347 break;
1348 } 1348 }
1349 } 1349 }
1350 } 1350 }
1351 if (!found) { 1351 if (!found) {
1352 ErrorMsg("const field '%s' not initialized", 1352 ErrorMsg("final field '%s' not initialized",
1353 String::Handle(field.name()).ToCString()); 1353 String::Handle(field.name()).ToCString());
1354 } 1354 }
1355 } 1355 }
1356 } 1356 }
1357 1357
1358 1358
1359 struct FieldInitExpression { 1359 struct FieldInitExpression {
1360 Field* inst_field; 1360 Field* inst_field;
1361 AstNode* expr; 1361 AstNode* expr;
1362 }; 1362 };
(...skipping 6411 matching lines...) Expand 10 before | Expand all | Expand 10 after
7774 void Parser::SkipQualIdent() { 7774 void Parser::SkipQualIdent() {
7775 ASSERT(IsIdentifier()); 7775 ASSERT(IsIdentifier());
7776 ConsumeToken(); 7776 ConsumeToken();
7777 if (CurrentToken() == Token::kPERIOD) { 7777 if (CurrentToken() == Token::kPERIOD) {
7778 ConsumeToken(); // Consume the kPERIOD token. 7778 ConsumeToken(); // Consume the kPERIOD token.
7779 ExpectIdentifier("identifier expected after '.'"); 7779 ExpectIdentifier("identifier expected after '.'");
7780 } 7780 }
7781 } 7781 }
7782 7782
7783 } // namespace dart 7783 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698