cue: tweaks to selector API
- Move Qualifier (Sel previously) to the end of the terms
consistent with the rest of the API.
- Make SelectorType a bitmap.
This allows a Value.Field() method that takes a bitmap as
argument to select fields, isntead of the very verbose
functional syntax now.
- Remove IsOptional in favor of IsConstraint.
- Addjust FillPath logic a bit to make use of the bitmap.
We may still consider to use Kind, instead of Type
everywhere, also for consistency sake.
We coudl also consider calling StringLabel MemberLabel, consistent with JSON.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I5eadb9214890f6b75b25b5378799225d47811912
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542824
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>