mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Check "x = 1 + 2".
This commit is contained in:
1 parent
98f484bf63
commit
bd5f222fb6
4 files changed
+256
-27
No files matched your search
@@ -19,6 +19,8 @@ var (
|
||||
TypeExprIdealNumber = a.NewTypeExpr(0, t.IDIdeal, nil, nil, nil)
|
||||
)
|
||||
|
||||
func numeric(n *a.TypeExpr) bool { return n == TypeExprIdealNumber || n.IsNumType() }
|
||||
|
||||
// TypeMap maps from variable names (as token IDs) to types.
|
||||
type TypeMap map[t.ID]*a.TypeExpr
|
||||
|
||||
@@ -158,4 +160,12 @@ var numTypeRanges = [256][2]*big.Int{
|
||||
var (
|
||||
zero = big.NewInt(0)
|
||||
one = big.NewInt(1)
|
||||
ffff = big.NewInt(0xFFFF)
|
||||
)
|
||||
|
||||
func btoi(b bool) *big.Int {
|
||||
if b {
|
||||
return one
|
||||
}
|
||||
return zero
|
||||
}
|
||||
Reference in new issue
Block a user