-
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/astinternal: revise API with more options
Add two options which will soon be useful. First, an OmitEmpty boolean option, as invalid or empty lines like the ones below are usually not helpful: Optional: token.Pos("-") Constraint: token.Token("ILLEGAL") Attrs: []*ast.Attribute{} Second, add a Filter func option which gives flexibility in terms of what Go values we are interested in. For example, the TOML tests will soon use this to only print token.Pos values. For #3379. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Iaa1af9f987d68b3cafeaaece2ef697e2fa2b7678 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200204 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Matthew Sackman <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information
Showing
7 changed files
with
442 additions
and
56 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
Oops, something went wrong.