diff --git a/lang/check/check.go b/lang/check/check.go index f4ab609a..433cf6c7 100644 --- a/lang/check/check.go +++ b/lang/check/check.go @@ -51,7 +51,7 @@ func (e *Error) Error() string { // TypeExprFoo is an *ast.Node MType (implicit type). var ( TypeExprBool = a.NewTypeExpr(0, t.IDBool, nil, nil, nil) - TypeExprIdeal = a.NewTypeExpr(0, t.IDIdeal, nil, nil, nil) + TypeExprIdeal = a.NewTypeExpr(0, t.IDDoubleZ, nil, nil, nil) TypeExprU8 = a.NewTypeExpr(0, t.IDU8, nil, nil, nil) ) diff --git a/lang/token/list.go b/lang/token/list.go index 704cb6b0..a3423f5f 100644 --- a/lang/token/list.go +++ b/lang/token/list.go @@ -118,7 +118,8 @@ func (t Token) IsNumType() bool { return Flags(t.ID)&FlagsNumType != 0 // nBuiltInKeys is the number of built-in Keys. The packing is: // - Zero is invalid. -// - [0x01, 0x2F] are squiggly punctuation, such as "(", ")" and ";". +// - [0x01, 0x0F] are reserved for implementation details. +// - [0x10, 0x2F] are squiggly punctuation, such as "(", ")" and ";". // - [0x30, 0x3F] are squiggly assignments, such as "=" and "+=". // - [0x40, 0x5F] are operators, such as "+", "==" and "not". // - [0x60, 0x7F] are keywords, such as "if" and "return". @@ -133,6 +134,8 @@ const nBuiltInKeys = Key(256) const ( KeyInvalid = Key(0) + KeyDoubleZ = Key(IDDoubleZ >> KeyShift) + KeyOpenParen = Key(IDOpenParen >> KeyShift) KeyCloseParen = Key(IDCloseParen >> KeyShift) KeyOpenBracket = Key(IDOpenBracket >> KeyShift) @@ -204,7 +207,6 @@ const ( KeyVia = Key(IDVia >> KeyShift) KeyPub = Key(IDPub >> KeyShift) KeyPri = Key(IDPri >> KeyShift) - KeyIdeal = Key(IDIdeal >> KeyShift) KeyFalse = Key(IDFalse >> KeyShift) KeyTrue = Key(IDTrue >> KeyShift) @@ -279,6 +281,8 @@ const ( const ( IDInvalid = ID(0) + IDDoubleZ = ID(0x01<