| 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 get currentElement; | 8 Element get currentElement; |
| 9 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4016 cancel(definitions.tail.head, 'internal error: extra definition'); | 4016 cancel(definitions.tail.head, 'internal error: extra definition'); |
| 4017 return null; | 4017 return null; |
| 4018 } | 4018 } |
| 4019 Node definition = definitions.head; | 4019 Node definition = definitions.head; |
| 4020 if (definition is NodeList) { | 4020 if (definition is NodeList) { |
| 4021 cancel(node, 'optional parameters are not implemented'); | 4021 cancel(node, 'optional parameters are not implemented'); |
| 4022 } | 4022 } |
| 4023 if (node.modifiers.isConst()) { | 4023 if (node.modifiers.isConst()) { |
| 4024 error(node, MessageKind.FORMAL_DECLARED_CONST); | 4024 error(node, MessageKind.FORMAL_DECLARED_CONST); |
| 4025 } | 4025 } |
| 4026 if (node.modifiers.isStatic()) { |
| 4027 error(node, MessageKind.FORMAL_DECLARED_STATIC); |
| 4028 } |
| 4026 | 4029 |
| 4027 if (currentDefinitions != null) { | 4030 if (currentDefinitions != null) { |
| 4028 cancel(node, 'function type parameters not supported'); | 4031 cancel(node, 'function type parameters not supported'); |
| 4029 } | 4032 } |
| 4030 currentDefinitions = node; | 4033 currentDefinitions = node; |
| 4031 Element element = definition.accept(this); | 4034 Element element = definition.accept(this); |
| 4032 currentDefinitions = null; | 4035 currentDefinitions = null; |
| 4033 return element; | 4036 return element; |
| 4034 } | 4037 } |
| 4035 | 4038 |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4367 return e; | 4370 return e; |
| 4368 } | 4371 } |
| 4369 | 4372 |
| 4370 /// Assumed to be called by [resolveRedirectingFactory]. | 4373 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4371 Element visitReturn(Return node) { | 4374 Element visitReturn(Return node) { |
| 4372 Node expression = node.expression; | 4375 Node expression = node.expression; |
| 4373 return finishConstructorReference(visit(expression), | 4376 return finishConstructorReference(visit(expression), |
| 4374 expression, expression); | 4377 expression, expression); |
| 4375 } | 4378 } |
| 4376 } | 4379 } |
| OLD | NEW |