Skip to content

Commit e561fda

Browse files
committed
Add RESERVED_.. token kinds to identical Ord values
1 parent f79e37b commit e561fda

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

src/Tokens.pas

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,25 @@
33

44
interface
55

6+
// The RESERVED_... values are placeholder for compatibility with previous versions.
7+
// This ensures the existing values are stable when new constants are defined for the existing logical blocks.
8+
// This is important to have 100% the same output in the A65 files.
69
type
710
TTokenKind = (
811
UNTYPETOK,
912

10-
CONSTTOK,
13+
CONSTTOK, // 1
1114
TYPETOK,
1215
VARTOK,
1316
PROCEDURETOK,
1417
FUNCTIONTOK,
1518
LABELTOK,
1619
UNITTOK,
1720

21+
RESERVED_8,
22+
RESERVED_9,
1823

19-
GETINTVECTOK,
24+
GETINTVECTOK, // 10
2025
SETINTVECTOK,
2126
CASETOK,
2227
BEGINTOK,
@@ -50,7 +55,7 @@ interface
5055
EXITTOK,
5156
RANGETOK,
5257

53-
EQTOK,
58+
EQTOK, // 43
5459
NETOK,
5560
LTTOK,
5661
LETOK,
@@ -59,7 +64,7 @@ interface
5964
LOTOK,
6065
HITOK,
6166

62-
DOTTOK,
67+
DOTTOK, // 51
6368
COMMATOK,
6469
SEMICOLONTOK,
6570
OPARTOK,
@@ -70,7 +75,7 @@ interface
7075
CBRACKETTOK,
7176
COLONTOK,
7277

73-
PLUSTOK,
78+
PLUSTOK, // 61
7479
MINUSTOK,
7580
MULTOK,
7681
DIVTOK,
@@ -83,7 +88,7 @@ interface
8388
ANDTOK,
8489
NOTTOK,
8590

86-
ASSIGNFILETOK,
91+
ASSIGNFILETOK, // 73
8792
RESETTOK,
8893
REWRITETOK,
8994
APPENDTOK,
@@ -93,7 +98,7 @@ interface
9398
GETRESOURCEHANDLETOK,
9499
SIZEOFRESOURCETOK,
95100

96-
WRITELNTOK,
101+
WRITELNTOK, // 82
97102
SIZEOFTOK,
98103
LENGTHTOK,
99104
HIGHTOK,
@@ -104,7 +109,7 @@ interface
104109
ROUNDTOK,
105110
ODDTOK,
106111

107-
PROGRAMTOK,
112+
PROGRAMTOK, // 92
108113
LIBRARYTOK,
109114
EXPORTSTOK,
110115
EXTERNALTOK,
@@ -123,16 +128,26 @@ interface
123128
INLINETOK,
124129
KEEPTOK,
125130

126-
SUCCTOK,
131+
SUCCTOK, // 110
127132
PREDTOK,
128133
PACKEDTOK,
129134
GOTOTOK,
130135
INTOK,
131136
VOLATILETOK,
132137
STRIPEDTOK,
133138

139+
RESERVED_117,
140+
RESERVED_118,
141+
RESERVED_119,
142+
RESERVED_120,
143+
RESERVED_121,
144+
RESERVED_122,
145+
RESERVED_123,
146+
RESERVED_124,
147+
RESERVED_125,
148+
RESERVED_126,
134149

135-
SETTOK, // Size = 32 SET OF
150+
SETTOK, // 127 Size = 32 SET OF
136151

137152
BYTETOK, // Size = 1 BYTE
138153
WORDTOK, // Size = 2 WORD
@@ -164,17 +179,32 @@ interface
164179

165180
DEREFERENCEARRAYTOK, // For ARRAY pointers
166181

182+
RESERVED_155,
183+
RESERVED_156,
184+
RESERVED_157,
185+
RESERVED_158,
186+
RESERVED_159,
167187

168-
DATAORIGINOFFSET,
188+
DATAORIGINOFFSET, // 160
169189
CODEORIGINOFFSET,
170190

171-
IDENTTOK,
191+
IDENTTOK, // 170
172192
INTNUMBERTOK,
173193
FRACNUMBERTOK,
174194
CHARLITERALTOK,
175195
STRINGLITERALTOK,
176196

177-
EVALTOK,
197+
RESERVED_175,
198+
RESERVED_176,
199+
RESERVED_177,
200+
RESERVED_178,
201+
RESERVED_179,
202+
RESERVED_180,
203+
RESERVED_181,
204+
RESERVED_182,
205+
RESERVED_183,
206+
207+
EVALTOK, // 184
178208
LOOPUNROLLTOK,
179209
NOLOOPUNROLLTOK,
180210
LINKTOK,

0 commit comments

Comments
 (0)