Check "b = not true".

This commit is contained in:
Nigel Tao committed 2017-05-12 16:03:35 +10:00
1 parent 5d51c6c42c
commit 0e59b05432
4 files changed
+56 -18

No files matched your search

+10 -4
View File
@@ -12,9 +12,12 @@ import (
t "github.com/google/puffs/lang/token"
)
// DummyTypeIdealNumber is an *ast.Node MType (implicit type) that means that n
// is an ideal numeric constant.
var DummyTypeIdealNumber = a.NewTypeExpr(0, t.IDIdeal, nil, nil, nil)
// TypeExprFoo is an *ast.Node MType (implicit type) that means that n is a
// boolean or a ideal numeric constant.
var (
TypeExprBoolean = a.NewTypeExpr(0, t.IDBool, nil, nil, nil)
TypeExprIdealNumber = a.NewTypeExpr(0, t.IDIdeal, nil, nil, nil)
)
// TypeMap maps from variable names (as token IDs) to types.
type TypeMap map[t.ID]*a.TypeExpr
@@ -152,4 +155,7 @@ var numTypeRanges = [256][2]*big.Int{
t.IDUsize >> t.KeyShift: {zero, zero},
}
var zero = big.NewInt(0)
var (
zero = big.NewInt(0)
one = big.NewInt(1)
)