cue/parser: allow full expressions for embeddings
This completes the implementation of the spec
allowing expressions for embeddings.
It also lifts the restriction in the spec.
Futher relaxing would be possible, but requires
lookahead.
Not that this is not unlike the Go ambiguity:
if foo == myStruct{} {
}
where parenthesis are required around the struct
literal.
Closes #106.
Change-Id: I629fc6e7a65612bbe754863ffd79a36b39a50dfe
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3300
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/doc/ref/spec.md b/doc/ref/spec.md
index d8849be..0f6744d 100644
--- a/doc/ref/spec.md
+++ b/doc/ref/spec.md
@@ -1295,8 +1295,8 @@
A struct resulting from such a unification is closed if either of the involved
structs were closed.
-Syntactically, embeddings may be any expression except that it only
-allows binary expressions with operators `&` or `|`.
+Syntactically, embeddings may be any expression, except that `<`
+is eagerly interpreted as a bind label.
```
S1: {