cue/ast,cue/ast/astutil: add Predeclared sentinel for builtin references
Add ast.Predeclared, a sentinel node that can be used as ast.Ident.Node
to mark a reference to a predeclared identifier like "self" or "int".
When Sanitize encounters a shadowed identifier with this sentinel, it
renames it to the "__"-prefixed form (e.g. "__self") which cannot be
shadowed, rather than introducing a let alias.
For #4151.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Iccc6cd07da85898230891bd135f7dc964fe460af
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1231144
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>