mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Rename [i:j] to [i .. j], the same as Rust
This commit is contained in:
1 parent
7872a8893b
commit
a9ea63ff06
16 files changed
+55
-50
No files matched your search
@@ -870,7 +870,7 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (bounds, error) {
|
||||
return bounds{}, err
|
||||
}
|
||||
|
||||
case t.IDColon:
|
||||
case t.IDDotDot:
|
||||
lhs := n.LHS().AsExpr()
|
||||
if _, err := q.bcheckExpr(lhs, depth); err != nil {
|
||||
return bounds{}, err
|
||||
|
||||
+2
-2
@@ -434,9 +434,9 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
n.SetMType(lTyp.Inner())
|
||||
return nil
|
||||
|
||||
case t.IDColon:
|
||||
case t.IDDotDot:
|
||||
// n is a slice.
|
||||
// TODO: require that the i and j in a[i:j] are *unsigned* (or
|
||||
// TODO: require that the i and j in a[i .. j] are *unsigned* (or
|
||||
// non-negative constants)?
|
||||
if mhs := n.MHS().AsExpr(); mhs != nil {
|
||||
if err := q.tcheckExpr(mhs, depth); err != nil {
|
||||
|
||||
Reference in new issue
Block a user