| OLD | NEW |
| 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, Map<Node, Element> elements) { | 10 void check(Node tree, Map<Node, Element> elements) { |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 checkAssignable(node, type, initializer); | 378 checkAssignable(node, type, initializer); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 return null; | 381 return null; |
| 382 } | 382 } |
| 383 | 383 |
| 384 Type visitWhile(While node) { | 384 Type visitWhile(While node) { |
| 385 checkCondition(node.condition); | 385 checkCondition(node.condition); |
| 386 type(node.body); | 386 type(node.body); |
| 387 } | 387 } |
| 388 |
| 389 Type visitParenthesizedExpression(ParenthesizedExpression node) { |
| 390 return type(node.expression); |
| 391 } |
| 388 } | 392 } |
| OLD | NEW |