OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 package com.google.dart.compiler.ast; | 5 package com.google.dart.compiler.ast; |
6 | 6 |
| 7 import com.google.dart.compiler.type.Type; |
| 8 |
7 /** | 9 /** |
8 * Abstract base class for Dart expressions. | 10 * Abstract base class for Dart expressions. |
9 */ | 11 */ |
10 public abstract class DartExpression extends DartNode { | 12 public abstract class DartExpression extends DartNode { |
| 13 Type type; |
11 | 14 |
12 public boolean isAssignable() { | 15 public boolean isAssignable() { |
13 // By default you cannot assign to expressions. | 16 // By default you cannot assign to expressions. |
14 return false; | 17 return false; |
15 } | 18 } |
16 | 19 |
17 @Override | 20 @Override |
18 public DartExpression getNormalizedNode() { | 21 public DartExpression getNormalizedNode() { |
19 return (DartExpression) super.getNormalizedNode(); | 22 return (DartExpression) super.getNormalizedNode(); |
20 } | 23 } |
| 24 |
| 25 @Override |
| 26 public void setType(Type type) { |
| 27 this.type = type; |
| 28 } |
| 29 |
| 30 @Override |
| 31 public Type getType() { |
| 32 return type; |
| 33 } |
21 } | 34 } |
OLD | NEW |