Open JBontes opened 6 years ago
Currently DelphiAST does not register a forwarded object type reference. The following snippet fixes this issue.
object
procedure TPasSyntaxTreeBuilder.ObjectForward; begin FStack.Peek.SetAttribute(anForwarded, AttributeValues[atTrue]); FStack.Peek.SetAttribute(anType, AttributeValues[atObject]); inherited; end; procedure TPasSyntaxTreeBuilder.ClassForward; begin FStack.Peek.SetAttribute(anForwarded, AttributeValues[atTrue]); FStack.Peek.SetAttribute(anType, AttributeValues[atClass]); inherited; end; type TAttributeValue = (atAsm, atTrue, atFunction, atProcedure, atClassOf, atClass, atConst, atConstructor, atDestructor, atEnum, atInterface, atNil, atNumeric, atOut, atPointer, atName, atString, atSubRange, atVar, atType{ExplicitType}, atObject);
We need to add a attribute anType so we can know if it's a forwarded class or object reference.
anType
class
Currently DelphiAST does not register a forwarded
object
type reference.The following snippet fixes this issue.
We need to add a attribute
anType
so we can know if it's a forwardedclass
orobject
reference.