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

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2488043002: Enable generic method support by default (Closed)
Patch Set: clean up Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.test.src.summary.summary_common; 5 library analyzer.test.src.summary.summary_common;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/error/listener.dart'; 9 import 'package:analyzer/error/listener.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return obj.toString(); 67 return obj.toString();
68 } 68 }
69 } 69 }
70 70
71 UnlinkedPublicNamespace computePublicNamespaceFromText( 71 UnlinkedPublicNamespace computePublicNamespaceFromText(
72 String text, Source source) { 72 String text, Source source) {
73 CharacterReader reader = new CharSequenceReader(text); 73 CharacterReader reader = new CharSequenceReader(text);
74 Scanner scanner = 74 Scanner scanner =
75 new Scanner(source, reader, AnalysisErrorListener.NULL_LISTENER); 75 new Scanner(source, reader, AnalysisErrorListener.NULL_LISTENER);
76 Parser parser = new Parser(source, AnalysisErrorListener.NULL_LISTENER); 76 Parser parser = new Parser(source, AnalysisErrorListener.NULL_LISTENER);
77 parser.parseGenericMethods = true;
78 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); 77 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());
79 UnlinkedPublicNamespace namespace = new UnlinkedPublicNamespace.fromBuffer( 78 UnlinkedPublicNamespace namespace = new UnlinkedPublicNamespace.fromBuffer(
80 public_namespace.computePublicNamespace(unit).toBuffer()); 79 public_namespace.computePublicNamespace(unit).toBuffer());
81 return namespace; 80 return namespace;
82 } 81 }
83 82
84 /** 83 /**
85 * Type of a function that validates an [EntityRef]. 84 * Type of a function that validates an [EntityRef].
86 */ 85 */
87 typedef void _EntityRefValidator(EntityRef entityRef); 86 typedef void _EntityRefValidator(EntityRef entityRef);
(...skipping 10275 matching lines...) Expand 10 before | Expand all | Expand 10 after
10363 class _PrefixExpectation { 10362 class _PrefixExpectation {
10364 final ReferenceKind kind; 10363 final ReferenceKind kind;
10365 final String name; 10364 final String name;
10366 final String absoluteUri; 10365 final String absoluteUri;
10367 final String relativeUri; 10366 final String relativeUri;
10368 final int numTypeParameters; 10367 final int numTypeParameters;
10369 10368
10370 _PrefixExpectation(this.kind, this.name, 10369 _PrefixExpectation(this.kind, this.name,
10371 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); 10370 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0});
10372 } 10371 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summarize_ast_test.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698