| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |