From cf3387efd3ef971db3582954f25b44de53b50e79 Mon Sep 17 00:00:00 2001 From: Riley Porter Date: Tue, 3 Aug 2021 00:32:22 +0000 Subject: [PATCH] Remove Link depenedency in Tagging debug class. Change-Id: Iabd0edb24eee278c3f12a9f61fe535645e1f26d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208761 Commit-Queue: Riley Porter Reviewed-by: Sigmund Cherem --- pkg/kernel/lib/text/indentation.dart | 10 +++------- pkg/kernel/pubspec.yaml | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pkg/kernel/lib/text/indentation.dart b/pkg/kernel/lib/text/indentation.dart index 0b7f8ee098e..4c9c3449091 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 @@ class Indentation { abstract class Tagging implements Indentation { StringBuffer sb = new StringBuffer(); - Link tagStack = const Link(); + List 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 c8300b2bde1..72c08205177 100644 --- a/pkg/kernel/pubspec.yaml +++ b/pkg/kernel/pubspec.yaml @@ -8,8 +8,6 @@ publish_to: none 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: