Rename IDDiamond to IDDagger1 and IDDagger2

This commit is contained in:
Nigel Tao committed 2018-05-18 13:15:39 +10:00
1 parent e4320c3c6d
commit 6e06d1f9f1
5 files changed
+70 -49

No files matched your search

+25 -18
View File
@@ -397,15 +397,19 @@ const (
IDEmptyStruct = ID(0x100)
IDBool = ID(0x101)
IDStatus = ID(0x102)
IDIOReader = ID(0x103)
IDIOWriter = ID(0x104)
IDCapitalT = ID(0x105)
IDImageBuffer = ID(0x106)
IDImageConfig = ID(0x107)
IDPilcrow = ID(0x10D)
IDDiamond = ID(0x10E)
IDImageBuffer = ID(0x102)
IDImageConfig = ID(0x103)
IDIOReader = ID(0x104)
IDIOWriter = ID(0x105)
IDStatus = ID(0x106)
IDT1 = ID(0x10A)
IDT2 = ID(0x10B)
IDDagger1 = ID(0x10C)
IDDagger2 = ID(0x10D)
IDPilcrow = ID(0x10E)
// It is important that IDDoubleZ is right next to the IDI8..IDU64 block.
// See the ID.IsNumTypeOrIdeal method.
@@ -588,28 +592,31 @@ var builtInsByID = [nBuiltInIDs]string{
IDEmptyStruct: "empty_struct",
IDBool: "bool",
IDStatus: "status",
IDIOReader: "io_reader",
IDIOWriter: "io_writer",
IDCapitalT: "T",
IDImageBuffer: "image_buffer",
IDImageConfig: "image_config",
IDIOReader: "io_reader",
IDIOWriter: "io_writer",
IDStatus: "status",
// The next few IDs are never returned by the tokenizer, as it rejects
// non-ASCII input. The string representations "¶", "◊" and "ℤ" are
// Some of the next few IDs are never returned by the tokenizer, as it
// rejects non-ASCII input. The string representations "¶", "ℤ" etc. are
// specifically non-ASCII so that no user-defined (non built-in) identifier
// will conflict with them.
// IDDaggerN is used by the type checker as a dummy-valued built-in ID to
// represent a generic type.
IDT1: "T1",
IDT2: "T2",
IDDagger1: "†", // U+2020 DAGGER
IDDagger2: "‡", // U+2021 DOUBLE DAGGER
// IDPilcrow is used by the type checker to build a placeholder MType for
// AST nodes that aren't expression nodes, such as struct definition nodes
// and statement nodes. Its presence means that the non-expression node is
// type checked.
IDPilcrow: "¶", // U+00B6 PILCROW SIGN
// IDDiamond is used by the type checker as a dummy-valued built-in ID to
// represent a generic type.
IDDiamond: "◊", // U+25C7 WHITE DIAMOND
// IDDoubleZ is used by the type checker as a dummy-valued built-in ID to
// represent an ideal integer type (in mathematical terms, the integer ring
// ℤ), as opposed to a realized integer type whose range is restricted. For