| OLD | NEW |
| 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element operator[](Node node); | 8 Element operator[](Node node); |
| 9 Selector getSelector(Send send); | 9 Selector getSelector(Send send); |
| 10 DartType getType(Node node); | 10 DartType getType(Node node); |
| (...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 error(node, MessageKind.THROW_WITHOUT_EXPRESSION); | 2093 error(node, MessageKind.THROW_WITHOUT_EXPRESSION); |
| 2094 } | 2094 } |
| 2095 visit(node.expression); | 2095 visit(node.expression); |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 visitVariableDefinitions(VariableDefinitions node) { | 2098 visitVariableDefinitions(VariableDefinitions node) { |
| 2099 VariableDefinitionsVisitor visitor = | 2099 VariableDefinitionsVisitor visitor = |
| 2100 new VariableDefinitionsVisitor(compiler, node, this, | 2100 new VariableDefinitionsVisitor(compiler, node, this, |
| 2101 ElementKind.VARIABLE); | 2101 ElementKind.VARIABLE); |
| 2102 // Ensure that we set the type of the [VariableListElement] since it depends | 2102 // Ensure that we set the type of the [VariableListElement] since it depends |
| 2103 // the current scope. If the current scope is a [MethodScope] or | 2103 // on the current scope. If the current scope is a [MethodScope] or |
| 2104 // [BlockScope] it will not be available for the | 2104 // [BlockScope] it will not be available for the |
| 2105 // [VariableListElement.computeType] method. | 2105 // [VariableListElement.computeType] method. |
| 2106 if (node.type != null) { | 2106 if (node.type != null) { |
| 2107 visitor.variables.type = resolveTypeAnnotation(node.type); | 2107 visitor.variables.type = resolveTypeAnnotation(node.type); |
| 2108 } else { | 2108 } else { |
| 2109 visitor.variables.type = compiler.types.dynamicType; | 2109 visitor.variables.type = compiler.types.dynamicType; |
| 2110 } | 2110 } |
| 2111 visitor.visit(node.definitions); | 2111 visitor.visit(node.definitions); |
| 2112 } | 2112 } |
| 2113 | 2113 |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3262 return e; | 3262 return e; |
| 3263 } | 3263 } |
| 3264 | 3264 |
| 3265 /// Assumed to be called by [resolveRedirectingFactory]. | 3265 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3266 Element visitReturn(Return node) { | 3266 Element visitReturn(Return node) { |
| 3267 Node expression = node.expression; | 3267 Node expression = node.expression; |
| 3268 return finishConstructorReference(visit(expression), | 3268 return finishConstructorReference(visit(expression), |
| 3269 expression, expression); | 3269 expression, expression); |
| 3270 } | 3270 } |
| 3271 } | 3271 } |
| OLD | NEW |