mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
ast: add TypeExpr.IsSmallInteger method
This commit is contained in:
1 parent
c4d2fa13da
commit
0164364106
3 files changed
+8
-13
No files matched your search
@@ -286,13 +286,7 @@ func (g *gen) writeExprUnaryOp(b *buffer, n *a.Expr, depth uint32) error {
|
||||
}
|
||||
|
||||
func (g *gen) writeExprBinaryOp(b *buffer, n *a.Expr, depth uint32) error {
|
||||
opName, lhsCast, overallCast := "", false, false
|
||||
|
||||
if typ := n.MType(); typ.IsNumType() {
|
||||
if u := typ.QID()[1]; u == t.IDU8 || u == t.IDU16 {
|
||||
overallCast = true
|
||||
}
|
||||
}
|
||||
opName, lhsCast, overallCast := "", false, n.MType().IsSmallInteger()
|
||||
|
||||
op := n.Operator()
|
||||
switch op {
|
||||
|
||||
Reference in new issue
Block a user