The following two code lines register exactly the same:
type
x = type integer;
y = integer;
This is incorrect. The explicit type declaration should be recorded.
The following changes fix this issue:
TPasSyntaxTreeBuilder = class(TmwSimplePasPar)
...
procedure ExplicitType; override;
...
type
TAttributeValue = (atAsm, atTrue, atFunction, atProcedure, atClassOf, atClass,
atConst, atConstructor, atDestructor, atEnum, atInterface, atNil, atNumeric,
atOut, atPointer, atName, atString, atSubRange, atVar, atType{ExplicitType});
procedure TPasSyntaxTreeBuilder.ExplicitType;
begin
inherited;
FStack.Peek.SetAttribute(anKind, AttributeValues[atType]);
end;
end;
The following two code lines register exactly the same:
This is incorrect. The explicit type declaration should be recorded.
The following changes fix this issue: