internal/core/adt: add Expr method on CallContext
This method allows looking up the unevaluated
expression of a CallExpr. To avoid having to create
a slice, it computes the exact position of the
argument depending on whether the call represents
a validation or function call.
As expressions are raw, we now also need to set
the Environment in Validate. For calls the
Environment was already passed correctly.
The usage of these calls will happen in subsequent
CLs. We make these change already to isolate any
problems that may arise from these more
straightforward changes.
Issue #3649
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I2818a7f0ca8fb00c8746007e64623d0278e31c53
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1208684
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>