-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The base offset seems to be a hangover from the origins of the package in [`go/token`](https://pkg.go.dev/go/token#FileSet.AddFile). In that package, it signifies the overall offset inside a set of line information shared amongst between many files. In `cue/token`, by contrast, it doesn't signify anything, witnessed by the fact that when we _do_ try to use it, it [doesn't have the desired effect](cue-lang/cue#2776). In effect, the base is added to the internal index stored in a `token.Pos` and then removed before it's made visible to the API. Because it's confusing, and because in general we can't say that we're starting at an arbitrary point in a file and hope line and column information will be able to work, we deprecate the API, maintaining all user-visible behavior. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I57d0f54722bf4aa872ef1f36e2d2a8e2e43a5810 Dispatch-Trailer: {"type":"trybot","CL":1175779,"patchset":4,"ref":"refs/changes/79/1175779/4","targetBranch":"master"}
- Loading branch information
Showing
10 changed files
with
55 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters