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

Side by Side Diff: pkg/front_end/lib/src/fasta/util/relativize.dart

Issue 2691523002: Ensure locations are always provided, but don't store them yet. (Closed)
Patch Set: Address comments. Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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.
4
5 library fasta.util.relativize;
6
7 // TODO(ahe): Move more advanced version from dart2js here.
8
9 String relativizeUri(Uri uri, {Uri base}) {
10 if (uri == null) return null;
11 base ??= Uri.base;
12 String result = "$uri";
13 return result.startsWith("$base") ? result.substring("$base".length) : result;
14 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_library_builder.dart ('k') | pkg/front_end/test/subpackage_relationships_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698