procedure TPasSyntaxTreeBuilder.DirectiveBinding;
var
Token: string;
begin
token := Lexer.Token;
// Method bindings:
if SameText(Token, 'override') or SameText(token, 'virtual')
or SameText(Token, 'dynamic') or SameText(Token, 'static')
then
FStack.Peek.Attribute[anMethodBinding]:= Token
// Other directives
else if SameText(token, 'reintroduce') then
FStack.Peek.Attribute[anReintroduce]:= AttributeValues[atTrue]
else if SameText(Token, 'overload') then
FStack.Peek.Attribute[anOverload]:= AttributeValues[atTrue]
else if SameText(Token, 'abstract') or SameText(Token, 'final') then
FStack.Peek.Attribute[anAbstract]:= Token;
inherited;
end;
The
static
method binding is not recorded.Here's the fix: