Commit e323372
committed
Refactor + Features (sorry)
Added:
- `alone` to `TokenTreePunct` ensuring if a token is `Punct` its `spacing` is `Alone`
- `*_alone` functions to `TokenParser` setting the last token to `Alone` if it is a punctuat
on.
- `next_n` to `TokenParser` returning the next `n` tokens.
- `peek_range` to `TokenParser` returning a range of tokens.
Changed:
- **Breaking Change** `Peeker::LENGTH` is function `len` now.
- **Breaking Change** `TokenParser::*_{punctuation}` got renamed to `*_tt_{punctuation}` and their behaviour was changed to match that of `$tt` in macro_rules instead of requiring `Spac ing::Alone`, returned `spacing` is set to `Alone`.
- `next_expr` and `next_type` set the last tokens `spacing` to `Alone`.1 parent ac665a5 commit e323372
3 files changed
+487
-90
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| 157 | + | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| |||
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
| 196 | + | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
191 | 208 | | |
192 | 209 | | |
193 | 210 | | |
| |||
199 | 216 | | |
200 | 217 | | |
201 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
202 | 228 | | |
203 | 229 | | |
204 | 230 | | |
| |||
235 | 261 | | |
236 | 262 | | |
237 | 263 | | |
| 264 | + | |
238 | 265 | | |
239 | 266 | | |
240 | 267 | | |
241 | 268 | | |
242 | 269 | | |
243 | 270 | | |
| 271 | + | |
244 | 272 | | |
245 | 273 | | |
246 | 274 | | |
| |||
0 commit comments