| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show Resolution, ParsingContext; | 8 import '../common/resolution.dart' show Resolution, ParsingContext; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constant_constructors.dart'; | 10 import '../constants/constant_constructors.dart'; |
| (...skipping 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2293 this.constructor = constructor, | 2293 this.constructor = constructor, |
| 2294 super(constructor.name, ElementKind.GENERATIVE_CONSTRUCTOR_BODY, | 2294 super(constructor.name, ElementKind.GENERATIVE_CONSTRUCTOR_BODY, |
| 2295 Modifiers.EMPTY, constructor.enclosingElement) { | 2295 Modifiers.EMPTY, constructor.enclosingElement) { |
| 2296 functionSignature = constructor.functionSignature; | 2296 functionSignature = constructor.functionSignature; |
| 2297 } | 2297 } |
| 2298 | 2298 |
| 2299 bool get hasNode => _resolvedAst.kind == ResolvedAstKind.PARSED; | 2299 bool get hasNode => _resolvedAst.kind == ResolvedAstKind.PARSED; |
| 2300 | 2300 |
| 2301 FunctionExpression get node => _resolvedAst.node; | 2301 FunctionExpression get node => _resolvedAst.node; |
| 2302 | 2302 |
| 2303 bool get hasResolvedAst => true; |
| 2304 |
| 2303 ResolvedAst get resolvedAst { | 2305 ResolvedAst get resolvedAst { |
| 2304 if (_resolvedAst.kind == ResolvedAstKind.PARSED) { | 2306 if (_resolvedAst.kind == ResolvedAstKind.PARSED) { |
| 2305 return new ParsedResolvedAst(declaration, _resolvedAst.node, | 2307 return new ParsedResolvedAst(declaration, _resolvedAst.node, |
| 2306 _resolvedAst.body, _resolvedAst.elements, _resolvedAst.sourceUri); | 2308 _resolvedAst.body, _resolvedAst.elements, _resolvedAst.sourceUri); |
| 2307 } else { | 2309 } else { |
| 2308 return new SynthesizedResolvedAst(declaration, _resolvedAst.kind); | 2310 return new SynthesizedResolvedAst(declaration, _resolvedAst.kind); |
| 2309 } | 2311 } |
| 2310 } | 2312 } |
| 2311 | 2313 |
| 2312 List<MetadataAnnotation> get metadata => constructor.metadata; | 2314 List<MetadataAnnotation> get metadata => constructor.metadata; |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 body = node.asFunctionExpression().body; | 3284 body = node.asFunctionExpression().body; |
| 3283 } | 3285 } |
| 3284 return new ParsedResolvedAst( | 3286 return new ParsedResolvedAst( |
| 3285 declaration, | 3287 declaration, |
| 3286 node, | 3288 node, |
| 3287 body, | 3289 body, |
| 3288 definingElement.treeElements, | 3290 definingElement.treeElements, |
| 3289 definingElement.compilationUnit.script.resourceUri); | 3291 definingElement.compilationUnit.script.resourceUri); |
| 3290 } | 3292 } |
| 3291 } | 3293 } |
| OLD | NEW |