Skip to content

Commit 64e3db3

Browse files
Partoufclaude
andcommitted
Register the UnicodeString keyword handler
TmwBasePasLex.Func158 lexes UnicodeString as ptString with ExID ptUnicodeString, the way Func-handlers already treat AnsiString and WideString, but InitIdent never put it in FIdentFuncTable. 'UnicodeString' hashes to 158, which had no entry, so the handler was unreachable (Delphi: H2219 Private symbol 'Func158' declared but never used) and the word lexed as a plain identifier. Declarations parse the same either way. The difference is a typecast: UnicodeString(p^) built a CALL whose callee was an IDENTIFIER, which cannot be told apart from a call to a routine of that name, while AnsiString(p^) and WideString(p^) build a TYPE callee. Now all three do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4b67cb1 commit 64e3db3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Source/SimpleParser/SimpleParser.Lexer.pas‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ procedure TmwBasePasLex.InitIdent;
574574
141: FIdentFuncTable[I] := Func141;
575575
142: FIdentFuncTable[I] := Func142;
576576
143: FIdentFuncTable[I] := Func143;
577+
158: FIdentFuncTable[I] := Func158;
577578
166: FIdentFuncTable[I] := Func166;
578579
167: FIdentFuncTable[I] := Func167;
579580
168: FIdentFuncTable[I] := Func168;

0 commit comments

Comments
 (0)