Bounds check "x >> y".

This commit is contained in:
Nigel Tao committed 2017-06-02 10:57:56 +10:00
1 parent 51da37c661
commit 5a0aea66a3
4 files changed
+29

No files matched your search

+6
View File
@@ -3,6 +3,10 @@
package token
// MaxIntBits is the largest size (in bits) of the i8, u8, i16, u16, etc.
// integer types.
const MaxIntBits = 64
// Flags are the low 16 bits of an ID. For example, they signify whether a
// token is an operator, an identifier, etc.
//
@@ -471,6 +475,8 @@ var builtInsByKey = [nBuiltInKeys]struct {
KeyTrue: {"true", IDTrue},
KeyZero: {"0", IDZero},
// Change MaxIntBits if a future update adds an i128 or u128 type.
KeyI8: {"i8", IDI8},
KeyI16: {"i16", IDI16},
KeyI32: {"i32", IDI32},