| 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 #library('elements'); | 5 #library('elements'); |
| 6 | 6 |
| 7 #import('../tree/tree.dart'); | 7 #import('../tree/tree.dart'); |
| 8 #import('../scanner/scannerlib.dart'); | 8 #import('../scanner/scannerlib.dart'); |
| 9 #import('../leg.dart'); // TODO(karlklose): we only need type. | 9 #import('../leg.dart'); // TODO(karlklose): we only need type. |
| 10 #import('../util/util.dart'); | 10 #import('../util/util.dart'); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 bool isCompilationUnit() { | 119 bool isCompilationUnit() { |
| 120 return kind === ElementKind.COMPILATION_UNIT || | 120 return kind === ElementKind.COMPILATION_UNIT || |
| 121 kind === ElementKind.LIBRARY; | 121 kind === ElementKind.LIBRARY; |
| 122 } | 122 } |
| 123 bool isClass() => kind === ElementKind.CLASS; | 123 bool isClass() => kind === ElementKind.CLASS; |
| 124 bool isVariable() => kind === ElementKind.VARIABLE; | 124 bool isVariable() => kind === ElementKind.VARIABLE; |
| 125 bool isParameter() => kind === ElementKind.PARAMETER; | 125 bool isParameter() => kind === ElementKind.PARAMETER; |
| 126 bool isStatement() => kind === ElementKind.STATEMENT; | 126 bool isStatement() => kind === ElementKind.STATEMENT; |
| 127 bool isTypedef() => kind === ElementKind.TYPEDEF; | 127 bool isTypedef() => kind === ElementKind.TYPEDEF; |
| 128 bool isTypeVariable() => kind === ElementKind.TYPE_VARIABLE; | 128 bool isTypeVariable() => kind === ElementKind.TYPE_VARIABLE; |
| 129 bool isField() => kind === ElementKind.FIELD; |
| 129 bool isGetter() => kind === ElementKind.GETTER; | 130 bool isGetter() => kind === ElementKind.GETTER; |
| 130 bool isSetter() => kind === ElementKind.SETTER; | 131 bool isSetter() => kind === ElementKind.SETTER; |
| 131 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; | 132 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; |
| 132 bool isExtendable() => (kind.category & ElementCategory.IS_EXTENDABLE) != 0; | 133 bool isExtendable() => (kind.category & ElementCategory.IS_EXTENDABLE) != 0; |
| 133 | 134 |
| 134 bool isAssignable() { | 135 bool isAssignable() { |
| 135 if (modifiers != null && modifiers.isFinal()) return false; | 136 if (modifiers != null && modifiers.isFinal()) return false; |
| 136 if (isFunction() || isGenerativeConstructor()) return false; | 137 if (isFunction() || isGenerativeConstructor()) return false; |
| 137 return true; | 138 return true; |
| 138 } | 139 } |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 final Node node; | 1046 final Node node; |
| 1046 Type bound; | 1047 Type bound; |
| 1047 Type type; | 1048 Type type; |
| 1048 TypeVariableElement(name, Element enclosing, this.node, this.type, | 1049 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 1049 [this.bound]) | 1050 [this.bound]) |
| 1050 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 1051 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 1051 Type computeType(compiler) => type; | 1052 Type computeType(compiler) => type; |
| 1052 Node parseNode(compiler) => node; | 1053 Node parseNode(compiler) => node; |
| 1053 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1054 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1054 } | 1055 } |
| OLD | NEW |