| 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 'elements.dart'; | 8 import 'elements.dart'; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 bool get isAssignable { | 107 bool get isAssignable { |
| 108 if (isFinal || isConst) return false; | 108 if (isFinal || isConst) return false; |
| 109 if (isFunction || isGenerativeConstructor) return false; | 109 if (isFunction || isGenerativeConstructor) return false; |
| 110 return true; | 110 return true; |
| 111 } | 111 } |
| 112 | 112 |
| 113 Token get position => null; | 113 Token get position => null; |
| 114 | 114 |
| 115 SourceSpan get sourcePosition { | 115 SourceSpan get sourcePosition { |
| 116 if (position == null) return null; | 116 if (position == null) return null; |
| 117 Uri uri = compilationUnit.script.readableUri; | 117 Uri uri = compilationUnit.script.resourceUri; |
| 118 return new SourceSpan( | 118 return new SourceSpan( |
| 119 uri, position.charOffset, position.charOffset + position.charCount); | 119 uri, position.charOffset, position.charOffset + position.charCount); |
| 120 } | 120 } |
| 121 | 121 |
| 122 Token findMyName(Token token) { | 122 Token findMyName(Token token) { |
| 123 return findNameToken(token, isConstructor, name, enclosingElement.name); | 123 return findNameToken(token, isConstructor, name, enclosingElement.name); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static Token findNameToken(Token token, bool isConstructor, String name, | 126 static Token findNameToken(Token token, bool isConstructor, String name, |
| 127 String enclosingClassName) { | 127 String enclosingClassName) { |
| (...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2895 AstElement get definingElement; | 2895 AstElement get definingElement; |
| 2896 | 2896 |
| 2897 bool get hasResolvedAst => definingElement.hasTreeElements; | 2897 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2898 | 2898 |
| 2899 ResolvedAst get resolvedAst { | 2899 ResolvedAst get resolvedAst { |
| 2900 return new ResolvedAst(declaration, | 2900 return new ResolvedAst(declaration, |
| 2901 definingElement.node, definingElement.treeElements); | 2901 definingElement.node, definingElement.treeElements); |
| 2902 } | 2902 } |
| 2903 | 2903 |
| 2904 } | 2904 } |
| OLD | NEW |