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
gopls/internal/golang: Extract function: simplify using Cursor
This change deletes adjustRangeForCommentsAndWhiteSpace,
which duplicates functionality in PathEnclosingInterval
to turn a rough selection (including extraneous whitespace)
into a precise selection aligned with syntax nodes.
Instead we use a new function, astutil.Select, that does
the same thing but on Cursors, and push cursors throughout
the rest of the extract logic. In due course it should
replace all existing uses of PathEnclosingInterval.
Extract Variable will be dealt with in a follow-up.
Change-Id: I7c67757ffa4233d5e7a6f02e44e68e14c46faee7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/716340
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Madeline Kalil <mkalil@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
0 commit comments