You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using this and it didn't work at all. `prev_token` is never eof,
so the accumulator is always false, which means the `then_some` always
returns `None`, which means `scan` always returns `None`, and `tokens`
always ends up an empty vec. I'm not sure how this code was supposed to
work.
(An aside: I find `Iterator::scan` to be a pretty wretched function,
that produces code which is very hard to understand. Probably why this
is just one of two uses of it in the entire compiler.)
This commit changes it to a simpler imperative style that produces a
valid `tokens` vec.
0 commit comments