Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart

Issue 1878253002: Adds support for remaining generic method syntax constructs. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review 2 response Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698