File tree 2 files changed +3
-9
lines changed 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- import 'package:_fe_analyzer_shared/src/util/link.dart' show Link;
6
-
7
5
/// Indentation utility class. Should be used as a mixin in most cases.
8
6
class Indentation {
9
7
/// The current indentation string.
@@ -54,19 +52,17 @@ class Indentation {
54
52
55
53
abstract class Tagging <N > implements Indentation {
56
54
StringBuffer sb = new StringBuffer ();
57
- Link <String > tagStack = const Link < String >() ;
55
+ List <String > tagStack = [] ;
58
56
59
57
void pushTag (String tag) {
60
- tagStack = tagStack. prepend (tag);
58
+ tagStack. add (tag);
61
59
indentMore ();
62
60
}
63
61
64
62
String popTag () {
65
63
assert (! tagStack.isEmpty);
66
- String tag = tagStack.head;
67
- tagStack = tagStack.tail! ;
68
64
indentLess ();
69
- return tag ;
65
+ return tagStack. removeLast () ;
70
66
}
71
67
72
68
/// Adds given string to result string.
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ publish_to: none
8
8
environment :
9
9
sdk : ' >=2.12.0 <3.0.0'
10
10
dependencies :
11
- _fe_analyzer_shared :
12
- path : ../_fe_analyzer_shared
13
11
dev_dependencies :
14
12
args : ' >=0.13.4 <2.0.0'
15
13
expect :
You can’t perform that action at this time.
0 commit comments