mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Rename typeExprU8 to typeExprPlaceholder.
This commit is contained in:
1 parent
e5736cadf6
commit
c27bec10d3
2 files changed
+8
-6
No files matched your search
+3
-1
@@ -59,7 +59,9 @@ func trimQuotes(s string) string {
|
||||
var (
|
||||
typeExprBool = a.NewTypeExpr(0, t.IDBool, nil, nil, nil)
|
||||
typeExprIdeal = a.NewTypeExpr(0, t.IDDoubleZ, nil, nil, nil)
|
||||
typeExprU8 = a.NewTypeExpr(0, t.IDU8, nil, nil, nil)
|
||||
|
||||
// TODO: delete this.
|
||||
typeExprPlaceholder = a.NewTypeExpr(0, t.IDU8, nil, nil, nil)
|
||||
)
|
||||
|
||||
// TypeMap maps from variable names (as token IDs) to types.
|
||||
|
||||
+5
-5
@@ -336,7 +336,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
n.SetMType(typeExprU8) // HACK.
|
||||
n.SetMType(typeExprPlaceholder) // HACK.
|
||||
return nil
|
||||
}
|
||||
// TODO: delete this hack that only matches "foo.low_bits(etc)".
|
||||
@@ -346,7 +346,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
return err
|
||||
}
|
||||
n.LHS().SetTypeChecked()
|
||||
n.LHS().Expr().SetMType(typeExprU8) // HACK.
|
||||
n.LHS().Expr().SetMType(typeExprPlaceholder) // HACK.
|
||||
for _, o := range n.Args() {
|
||||
if err := q.tcheckArg(o.Arg(), depth); err != nil {
|
||||
return err
|
||||
@@ -456,9 +456,9 @@ func (q *checker) tcheckDot(n *a.Expr, depth uint32) error {
|
||||
// TODO: remove this hack and be more principled about the built-in
|
||||
// buf1 type.
|
||||
//
|
||||
// Another hack is using TypeExprU8 until a TypeExpr can represent
|
||||
// function types.
|
||||
n.SetMType(typeExprU8)
|
||||
// Another hack is using typeExprPlaceholder until a TypeExpr can
|
||||
// represent function types.
|
||||
n.SetMType(typeExprPlaceholder)
|
||||
return nil
|
||||
default:
|
||||
s = q.c.structs[name].Struct
|
||||
|
||||
Reference in new issue
Block a user