Skip to content

Commit cf3387e

Browse files
rileyportercommit-bot@chromium.org
authored and
commit-bot@chromium.org
committed
Remove Link depenedency in Tagging debug class.
Change-Id: Iabd0edb24eee278c3f12a9f61fe535645e1f26d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208761 Commit-Queue: Riley Porter <rileyporter@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
1 parent 23ba8d5 commit cf3387e

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

pkg/kernel/lib/text/indentation.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:_fe_analyzer_shared/src/util/link.dart' show Link;
6-
75
/// Indentation utility class. Should be used as a mixin in most cases.
86
class Indentation {
97
/// The current indentation string.
@@ -54,19 +52,17 @@ class Indentation {
5452

5553
abstract class Tagging<N> implements Indentation {
5654
StringBuffer sb = new StringBuffer();
57-
Link<String> tagStack = const Link<String>();
55+
List<String> tagStack = [];
5856

5957
void pushTag(String tag) {
60-
tagStack = tagStack.prepend(tag);
58+
tagStack.add(tag);
6159
indentMore();
6260
}
6361

6462
String popTag() {
6563
assert(!tagStack.isEmpty);
66-
String tag = tagStack.head;
67-
tagStack = tagStack.tail!;
6864
indentLess();
69-
return tag;
65+
return tagStack.removeLast();
7066
}
7167

7268
/// Adds given string to result string.

pkg/kernel/pubspec.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ publish_to: none
88
environment:
99
sdk: '>=2.12.0 <3.0.0'
1010
dependencies:
11-
_fe_analyzer_shared:
12-
path: ../_fe_analyzer_shared
1311
dev_dependencies:
1412
args: '>=0.13.4 <2.0.0'
1513
expect:

0 commit comments

Comments
 (0)