Skip to content

Commit

Permalink
doc/ref/spec.md: remove "dead code"
Browse files Browse the repository at this point in the history
This removed section is outdated and incorrect.
The relevant matter is discussed in the sections below.

Fixes #939

Change-Id: Id8bff5b790132177c95617621e87cfc613c28590
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9701
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed May 5, 2021
1 parent 3e10918 commit a31dd01
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions doc/ref/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1895,33 +1895,6 @@ e: c.greeting // "Hello, you!"

Primary expressions are the operands for unary and binary expressions.


```
Slice: indices must be complete
([0, 1, 2, 3] | [2, 3])[0:2] => [0, 1] | [2, 3]
([0, 1, 2, 3] | *[2, 3])[0:2] => [0, 1] | [2, 3]
([0,1,2,3]|[2,3], [2,3])[0:2] => ([0,1]|[2,3], [2,3])
Index
a: (1|2, 1)
b: ([0,1,2,3]|[2,3], [2,3])[a] => ([0,1,2,3]|[2,3][a], 3)
Binary operation
A binary is only evaluated if its operands are complete.
Input Maximum allowed evaluation
a: string string
b: 2 2
c: a * b a * 2
An error in a struct is if the evaluation of any expression results in
bottom, where an incomplete expression is not considered bottom.
```
<!-- TODO(mpvl)
Conversion |
-->
```
PrimaryExpr =
Operand |
Expand Down Expand Up @@ -1962,7 +1935,6 @@ x
(s + ".txt")
f(3.1415, true)
m["foo"]
s[i : j + 1]
obj.color
f.p[i].x
```
Expand Down

0 comments on commit a31dd01

Please sign in to comment.