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>
diff --git a/pkg/kernel/lib/text/indentation.dart b/pkg/kernel/lib/text/indentation.dart
index 0b7f8ee..4c9c344 100644
--- a/pkg/kernel/lib/text/indentation.dart
+++ b/pkg/kernel/lib/text/indentation.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:_fe_analyzer_shared/src/util/link.dart' show Link;
-
/// Indentation utility class. Should be used as a mixin in most cases.
class Indentation {
/// The current indentation string.
@@ -54,19 +52,17 @@
abstract class Tagging<N> implements Indentation {
StringBuffer sb = new StringBuffer();
- Link<String> tagStack = const Link<String>();
+ List<String> tagStack = [];
void pushTag(String tag) {
- tagStack = tagStack.prepend(tag);
+ tagStack.add(tag);
indentMore();
}
String popTag() {
assert(!tagStack.isEmpty);
- String tag = tagStack.head;
- tagStack = tagStack.tail!;
indentLess();
- return tag;
+ return tagStack.removeLast();
}
/// Adds given string to result string.
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index c8300b2..72c0820 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -8,8 +8,6 @@
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
- _fe_analyzer_shared:
- path: ../_fe_analyzer_shared
dev_dependencies:
args: '>=0.13.4 <2.0.0'
expect: