mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Ensure that all AST nodes are bounds checked
This commit is contained in:
1 parent
731ca8841b
commit
ee95b548ab
4 files changed
+147
-64
No files matched your search
+1
-6
@@ -393,6 +393,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
// structs from used packages.
|
||||
return fmt.Errorf("check: unrecognized identifier %q", id1.Str(q.tm))
|
||||
}
|
||||
|
||||
switch id1 {
|
||||
case t.IDFalse:
|
||||
n.SetConstValue(zero)
|
||||
@@ -403,12 +404,6 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
n.SetConstValue(one)
|
||||
n.SetMType(typeExprBool)
|
||||
return nil
|
||||
|
||||
case t.IDUnderscore:
|
||||
// TODO.
|
||||
|
||||
case t.IDThis:
|
||||
// TODO.
|
||||
}
|
||||
|
||||
case t.IDOpenParen, t.IDTry:
|
||||
|
||||
Reference in new issue
Block a user