mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +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 changed files with 3 additions and 9 deletions
|
@ -2,8 +2,6 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// 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.
|
/// Indentation utility class. Should be used as a mixin in most cases.
|
||||||
class Indentation {
|
class Indentation {
|
||||||
/// The current indentation string.
|
/// The current indentation string.
|
||||||
|
@ -54,19 +52,17 @@ class Indentation {
|
||||||
|
|
||||||
abstract class Tagging<N> implements Indentation {
|
abstract class Tagging<N> implements Indentation {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
Link<String> tagStack = const Link<String>();
|
List<String> tagStack = [];
|
||||||
|
|
||||||
void pushTag(String tag) {
|
void pushTag(String tag) {
|
||||||
tagStack = tagStack.prepend(tag);
|
tagStack.add(tag);
|
||||||
indentMore();
|
indentMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
String popTag() {
|
String popTag() {
|
||||||
assert(!tagStack.isEmpty);
|
assert(!tagStack.isEmpty);
|
||||||
String tag = tagStack.head;
|
|
||||||
tagStack = tagStack.tail!;
|
|
||||||
indentLess();
|
indentLess();
|
||||||
return tag;
|
return tagStack.removeLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds given string to result string.
|
/// Adds given string to result string.
|
||||||
|
|
|
@ -8,8 +8,6 @@ publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
_fe_analyzer_shared:
|
|
||||||
path: ../_fe_analyzer_shared
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
args: '>=0.13.4 <2.0.0'
|
args: '>=0.13.4 <2.0.0'
|
||||||
expect:
|
expect:
|
||||||
|
|
Loading…
Reference in a new issue