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

Side by Side Diff: pkg/analyzer/lib/src/summary/prelink.dart

Issue 1576173002: Handle setters properly in NameFilter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/test/src/summary/prelink_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:analyzer/src/summary/format.dart'; 5 import 'package:analyzer/src/summary/format.dart';
6 6
7 /** 7 /**
8 * Create a [PrelinkedLibraryBuilder] corresponding to the given 8 * Create a [PrelinkedLibraryBuilder] corresponding to the given
9 * [definingUnit], which should be the defining compilation unit for a library. 9 * [definingUnit], which should be the defining compilation unit for a library.
10 * Compilation units referenced by the defining compilation unit via `part` 10 * Compilation units referenced by the defining compilation unit via `part`
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 return result; 86 return result;
87 } 87 }
88 88
89 const NameFilter._({this.shownNames, this.hiddenNames}); 89 const NameFilter._({this.shownNames, this.hiddenNames});
90 90
91 /** 91 /**
92 * Determine if the given [name] is accepted by this [NameFilter]. 92 * Determine if the given [name] is accepted by this [NameFilter].
93 */ 93 */
94 bool accepts(String name) { 94 bool accepts(String name) {
95 if (name.endsWith('=')) {
96 name = name.substring(0, name.length - 1);
97 }
95 if (shownNames != null) { 98 if (shownNames != null) {
96 return shownNames.contains(name); 99 return shownNames.contains(name);
97 } else { 100 } else {
98 return !hiddenNames.contains(name); 101 return !hiddenNames.contains(name);
99 } 102 }
100 } 103 }
101 104
102 /** 105 /**
103 * Produce a new [NameFilter] by combining this [NameFilter] with another 106 * Produce a new [NameFilter] by combining this [NameFilter] with another
104 * one. The new [NameFilter] will only accept names that would be accepted 107 * one. The new [NameFilter] will only accept names that would be accepted
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 * [sourceUri] is also relative. 494 * [sourceUri] is also relative.
492 */ 495 */
493 String resolveUri(String sourceUri, String relativeUri) { 496 String resolveUri(String sourceUri, String relativeUri) {
494 if (sourceUri == null) { 497 if (sourceUri == null) {
495 return relativeUri; 498 return relativeUri;
496 } else { 499 } else {
497 return Uri.parse(sourceUri).resolve(relativeUri).toString(); 500 return Uri.parse(sourceUri).resolve(relativeUri).toString();
498 } 501 }
499 } 502 }
500 } 503 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/prelink_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698