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

Side by Side Diff: frog/leg/typechecker.dart

Issue 8769012: Start resolving classes and default constructors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/tree/nodes.dart ('k') | frog/leg/warnings.dart » ('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 class TypeCheckerTask extends CompilerTask { 5 class TypeCheckerTask extends CompilerTask {
6 TypeCheckerTask(Compiler compiler) : types = new Types(), super(compiler); 6 TypeCheckerTask(Compiler compiler) : types = new Types(), super(compiler);
7 String get name() => "Type checker"; 7 String get name() => "Type checker";
8 Types types; 8 Types types;
9 9
10 void check(Node tree, TreeElements elements) { 10 void check(Node tree, TreeElements elements) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 Type visitLiteralString(LiteralString node) { 335 Type visitLiteralString(LiteralString node) {
336 return types.stringType; 336 return types.stringType;
337 } 337 }
338 338
339 Type visitLiteralNull(LiteralNull node) { 339 Type visitLiteralNull(LiteralNull node) {
340 return types.dynamicType; 340 return types.dynamicType;
341 } 341 }
342 342
343 Type visitNewExpression(NewExpression node) {
344 // TODO(karlklose): return the type.
345 return types.dynamicType;
346 }
347
343 Type visitLiteralList(LiteralList node) { 348 Type visitLiteralList(LiteralList node) {
344 return types.dynamicType; 349 return types.dynamicType;
345 } 350 }
346 351
347 Type visitNodeList(NodeList node) { 352 Type visitNodeList(NodeList node) {
348 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { 353 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) {
349 type(link.head); 354 type(link.head);
350 } 355 }
351 return null; 356 return null;
352 } 357 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 433
429 Type visitWhile(While node) { 434 Type visitWhile(While node) {
430 checkCondition(node.condition); 435 checkCondition(node.condition);
431 type(node.body); 436 type(node.body);
432 } 437 }
433 438
434 Type visitParenthesizedExpression(ParenthesizedExpression node) { 439 Type visitParenthesizedExpression(ParenthesizedExpression node) {
435 return type(node.expression); 440 return type(node.expression);
436 } 441 }
437 } 442 }
OLDNEW
« no previous file with comments | « frog/leg/tree/nodes.dart ('k') | frog/leg/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698