| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // TODO(asgerf): Include metadata. | 5 // TODO(asgerf): Include metadata. |
| 6 // TODO(asgerf): Include cascade operator. | 6 // TODO(asgerf): Include cascade operator. |
| 7 library dart_printer; | 7 library dart_printer; |
| 8 | 8 |
| 9 import '../dart2jslib.dart' as dart2js; | 9 import '../dart2jslib.dart' as dart2js; |
| 10 import '../tree/tree.dart' as tree; | 10 import '../tree/tree.dart' as tree; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 /// [id] should not include the # symbol | 383 /// [id] should not include the # symbol |
| 384 LiteralSymbol(this.id); | 384 LiteralSymbol(this.id); |
| 385 } | 385 } |
| 386 | 386 |
| 387 /// A type literal. This is distinct from [Identifier] since the unparser | 387 /// A type literal. This is distinct from [Identifier] since the unparser |
| 388 /// needs to this distinguish a static invocation from a method invocation | 388 /// needs to this distinguish a static invocation from a method invocation |
| 389 /// on a type literal. | 389 /// on a type literal. |
| 390 class LiteralType extends Expression { | 390 class LiteralType extends Expression { |
| 391 final String name; | 391 final String name; |
| 392 | 392 |
| 393 elements.TypeDeclarationElement element; | 393 types.DartType type; |
| 394 | 394 |
| 395 LiteralType(this.name); | 395 LiteralType(this.name); |
| 396 } | 396 } |
| 397 | 397 |
| 398 /// Reference to a type variable. | 398 /// Reference to a type variable. |
| 399 /// This is distinct from [Identifier] since the unparser needs to this | 399 /// This is distinct from [Identifier] since the unparser needs to this |
| 400 /// distinguish a function invocation `T()` from a type variable invocation | 400 /// distinguish a function invocation `T()` from a type variable invocation |
| 401 /// `(T)()` (the latter is invalid, but must be generated anyway). | 401 /// `(T)()` (the latter is invalid, but must be generated anyway). |
| 402 class ReifyTypeVar extends Expression { | 402 class ReifyTypeVar extends Expression { |
| 403 final String name; | 403 final String name; |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 final StringChunk previous; | 1533 final StringChunk previous; |
| 1534 final tree.StringQuoting quoting; | 1534 final tree.StringQuoting quoting; |
| 1535 num cost; | 1535 num cost; |
| 1536 | 1536 |
| 1537 OpenStringChunk(this.previous, this.quoting, this.cost); | 1537 OpenStringChunk(this.previous, this.quoting, this.cost); |
| 1538 | 1538 |
| 1539 StringChunk end(int endIndex) { | 1539 StringChunk end(int endIndex) { |
| 1540 return new StringChunk(previous, quoting, endIndex); | 1540 return new StringChunk(previous, quoting, endIndex); |
| 1541 } | 1541 } |
| 1542 } | 1542 } |
| OLD | NEW |