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

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

Issue 8540013: Giving up on the change to report errors with factories and generic types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « frog/leg/util/link_implementation.dart ('k') | tests/language/language.status » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 6376 matching lines...) Expand 10 before | Expand all | Expand 10 after
6387 } 6387 }
6388 return type.raw(); 6388 return type.raw();
6389 } 6389 }
6390 6390
6391 6391
6392 void Parser::CheckConstructorCallTypeArguments( 6392 void Parser::CheckConstructorCallTypeArguments(
6393 intptr_t pos, Function& constructor, const TypeArguments& type_arguments) { 6393 intptr_t pos, Function& constructor, const TypeArguments& type_arguments) {
6394 if (!type_arguments.IsNull() && 6394 if (!type_arguments.IsNull() &&
6395 (type_arguments.Length() != 6395 (type_arguments.Length() !=
6396 Class::Handle(constructor.owner()).NumTypeArguments())) { 6396 Class::Handle(constructor.owner()).NumTypeArguments())) {
6397 ErrorMsg(pos, "Incorrect number of type arguments, expected %d got %d", 6397 // TODO(regis): report proper error once we can.
6398 Class::Handle(constructor.owner()).NumTypeArguments(), 6398 // ErrorMsg(pos, "Incorrect number of type arguments, expected %d got %d",
6399 type_arguments.Length()); 6399 // Class::Handle(constructor.owner()).NumTypeArguments(),
6400 // type_arguments.Length());
6400 } 6401 }
6401 } 6402 }
6402 6403
6403 6404
6404 // Parse "[" [ expr { "," expr } ["," ] "]". 6405 // Parse "[" [ expr { "," expr } ["," ] "]".
6405 // Note: if the array literal is empty and the brackets have no whitespace 6406 // Note: if the array literal is empty and the brackets have no whitespace
6406 // between them, the scanner recognizes the opening and closing bracket 6407 // between them, the scanner recognizes the opening and closing bracket
6407 // as one token of type Token::kINDEX. 6408 // as one token of type Token::kINDEX.
6408 AstNode* Parser::ParseArrayLiteral(intptr_t type_pos, 6409 AstNode* Parser::ParseArrayLiteral(intptr_t type_pos,
6409 bool is_const, 6410 bool is_const,
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
7284 } 7285 }
7285 7286
7286 7287
7287 void Parser::SkipNestedExpr() { 7288 void Parser::SkipNestedExpr() {
7288 const bool saved_mode = SetAllowFunctionLiterals(true); 7289 const bool saved_mode = SetAllowFunctionLiterals(true);
7289 SkipExpr(); 7290 SkipExpr();
7290 SetAllowFunctionLiterals(saved_mode); 7291 SetAllowFunctionLiterals(saved_mode);
7291 } 7292 }
7292 7293
7293 } // namespace dart 7294 } // namespace dart
OLDNEW
« no previous file with comments | « frog/leg/util/link_implementation.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698