Codelens doesn't parse the variant sections of record
types. Instead it defers to the ancestor parser, so no
symbol information is gathered.
Here's my fix:
procedure TStructuredTypeParser.ParseFieldList(const
aRecord : ICWRecord);
begin
while TokenID = ptIdentifier do
begin
ParseFieldDeclaration(aRecord);
SEMICOLON;
end;
if TokenID = ptCase then
begin
//(cbm) old code doesn't parse variant section
//VariantSection;
ParseRecordVariantSection(aRecord);
end;
SEMICOLON;
end;
procedure
TStructuredTypeParser.ParseRecordVariantSection(const
aRecord : ICWRecord);
begin
Expected(ptCase);
TagField;
Expected(ptOf);
RecordVariant;
while TokenID = ptSemiColon do
begin
SEMICOLON;
case TokenID of
ptElse, ptEnd:;
else
ParseRecordVariant(aRecord);
end;
end;
end;
Logged In: YES
user_id=689285
forgot an extra call to ParseRecordVariant (noted by //!! below)
procedure
TStructuredTypeParser.ParseRecordVariantSection(const
aRecord : ICWRecord);
begin
Expected(ptCase);
TagField;
Expected(ptOf);
ParseRecordVariant(aRecord); //!!
while TokenID = ptSemiColon do
begin
SEMICOLON;
case TokenID of
ptElse, ptEnd:;
else
ParseRecordVariant(aRecord);
end;
end;
end;