internal/cuetxtar: add at=, pos= order-independence, and hidden field guards
Add at=<path> directive to navigate from the annotated field's value to a
sub-path before checking the error. Add order-independent pos=[...] matching
so position specs can appear in any order and commas are optional. Reject
any+ pos= combinations that would be ambiguous. Guard against hidden field
labels (identifiers starting with _) in walkStruct and the top-level file
loop: skip walkField when cue.Label or cue.ParsePath returns an error path.
Add clear error reporting in runErrAssertion when at= contains an invalid
or hidden path. Update the inline-test-attributes spec and add tests.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I8ad6bdd562b2b75dd14b26c05804a754fb60867e
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1234941
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>