mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
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>
This commit is contained in:
parent
23ba8d564f
commit
cf3387efd3
|
@ -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<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.
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue