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
Implement backwards iteration for token.Cursor (#429)
This adds methods to `token.Cursor` to implement backwards iteration
with `Prev` and `PrevSkippable`. Methods `Pop` and `PopSkippable` have
been renamed to `Next` and `NextSkippable` to match the backward
counterparts. The constructor has been altered to `NewCursorAt` which
takes a single starting cursor. The bounds of the cursor iteration are
now delimited by the open and closing token when iterating.
These methods will be useful for reading attached and trailing comments.
0 commit comments