File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 78c077e428f53d4fc97650317044f6b204ac2d2b
2
+ refs/heads/master: d3b49f5aab6a9e9efc2ab1d6713cc0d2bde94f4e
Original file line number Diff line number Diff line change @@ -99,8 +99,10 @@ impure fn buffer_token(ps p, token tok) {
99
99
}
100
100
101
101
impure fn finish_block_scan ( ps p, contexttype tp) {
102
+ auto buf = p. buffered ;
103
+ auto front = _vec. shift [ token] ( buf) ;
102
104
auto indent;
103
- alt ( p . buffered . ( 0 ) ) {
105
+ alt ( front ) {
104
106
case ( open ( box_hv, ?ind) ) {
105
107
indent = ind;
106
108
}
@@ -109,25 +111,27 @@ impure fn finish_block_scan(ps p, contexttype tp) {
109
111
}
110
112
}
111
113
p. scandepth = 0 u;
114
+ p. buffered = vec ( ) ;
112
115
push_context ( p, tp, indent) ;
113
- _vec. shift [ token] ( p. buffered ) ;
114
- for ( token t in p. buffered) { add_token ( p, t) ; }
116
+ for ( token t in buf) { add_token ( p, t) ; }
115
117
}
116
118
117
119
impure fn finish_break_scan ( ps p) {
120
+ auto buf = p. buffered ;
121
+ auto front = _vec. shift [ token] ( buf) ;
118
122
if ( p. bufferedcol > p. width ) {
119
123
line_break ( p) ;
120
124
}
121
125
else {
122
126
auto width;
123
- alt ( p . buffered . ( 0 ) ) { case ( brk ( ?w) ) { width = w; } }
127
+ alt ( front ) { case ( brk ( ?w) ) { width = w; } }
124
128
auto i = 0 u;
125
129
while ( i < width) { p. out . write_str ( " " ) ; i+=1 u; }
126
130
p. col += width;
127
131
}
128
132
p. scandepth = 0 u;
129
- _vec . shift [ token ] ( p. buffered ) ;
130
- for ( token t in p . buffered ) { add_token ( p, t) ; }
133
+ p. buffered = vec ( ) ;
134
+ for ( token t in buf ) { add_token ( p, t) ; }
131
135
}
132
136
133
137
impure fn start_scan ( ps p, token tok) {
You can’t perform that action at this time.
0 commit comments