| 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 library dart_tree_printer; | 5 library dart_tree_printer; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../constants/values.dart' as values; | 8 import '../constants/values.dart' as values; |
| 9 import '../dart_types.dart' as types; | 9 import '../dart_types.dart' as types; |
| 10 import '../elements/elements.dart' as elements; | 10 import '../elements/elements.dart' as elements; |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 } else { | 1099 } else { |
| 1100 List<tree.Node> typeVariableList = <tree.Node>[]; | 1100 List<tree.Node> typeVariableList = <tree.Node>[]; |
| 1101 for (types.TypeVariableType typeVariable in typeVariables) { | 1101 for (types.TypeVariableType typeVariable in typeVariables) { |
| 1102 tree.Node id = makeIdentifier(typeVariable.name); | 1102 tree.Node id = makeIdentifier(typeVariable.name); |
| 1103 treeElements[id] = typeVariable.element; | 1103 treeElements[id] = typeVariable.element; |
| 1104 tree.Node bound; | 1104 tree.Node bound; |
| 1105 if (!typeVariable.element.bound.isObject) { | 1105 if (!typeVariable.element.bound.isObject) { |
| 1106 bound = | 1106 bound = |
| 1107 makeType(TypeGenerator.createType(typeVariable.element.bound)); | 1107 makeType(TypeGenerator.createType(typeVariable.element.bound)); |
| 1108 } | 1108 } |
| 1109 tree.TypeVariable node = new tree.TypeVariable(id, bound); | 1109 tree.TypeVariable node = new tree.TypeVariable(id, extendsToken, bound); |
| 1110 treeElements.setType(node, typeVariable); | 1110 treeElements.setType(node, typeVariable); |
| 1111 typeVariableList.add(node); | 1111 typeVariableList.add(node); |
| 1112 } | 1112 } |
| 1113 return makeList(',', typeVariableList, open: lt, close: gt); | 1113 return makeList(',', typeVariableList, open: lt, close: gt); |
| 1114 } | 1114 } |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 /// Create a [tree.NodeList] containing the declared interfaces. | 1117 /// Create a [tree.NodeList] containing the declared interfaces. |
| 1118 /// | 1118 /// |
| 1119 /// [interfaces] is from [elements.ClassElement] in reverse declaration order | 1119 /// [interfaces] is from [elements.ClassElement] in reverse declaration order |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 if (chunk.previous != null) { | 1332 if (chunk.previous != null) { |
| 1333 return new tree.StringJuxtaposition( | 1333 return new tree.StringJuxtaposition( |
| 1334 printStringChunk(chunk.previous), node); | 1334 printStringChunk(chunk.previous), node); |
| 1335 } else { | 1335 } else { |
| 1336 return node; | 1336 return node; |
| 1337 } | 1337 } |
| 1338 } | 1338 } |
| 1339 return printStringChunk(output.chunk); | 1339 return printStringChunk(output.chunk); |
| 1340 } | 1340 } |
| 1341 } | 1341 } |
| OLD | NEW |