-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal: simplify GetPackageInfo into an *ast.Package getter
The Index field was only used by the export package when obtaining the attributes attached to the declarations to export. We can use the length of ast.Package.Preamble instead. The Name field reflected ast.Package.Name.Name when the package was non-nil; so we can do that directly in the callers. The resulting code is no more complex than before. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I9e5c291bc01687fd2f9472638748f8abef417588 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200971 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information
Showing
4 changed files
with
19 additions
and
26 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