You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/cue: support more escape codes from Go string constants
We were using go/constant's ExactString to obtain a CUE expression,
which worked for the most part given how Go basic literals such as
strings are quite similar to CUE.
However, one crucial difference is that Go allows \x hexadecimal
escape sequences in strings, which ExactString prefers to use at times,
whereas CUE only allows them only in byte sequences:
Hexadecimal and octal escapes are only allowed within byte sequences (single quotes).
There is room for further improvement, as we should not be using
go/constant's ExactString for other kinds of basic literals either.
That's left for a separate change to make bisecting easier
if we introduce any unintentional regressions.
Fixes#2915.
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Iea040b34a321e7b95004f35431d42ab63604edd7
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211847
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
0 commit comments