RomanYankovsky / DelphiAST

Abstract syntax tree builder for Delphi
Mozilla Public License 2.0
271 stars 116 forks source link

`Automated` visibility section is not supported. #244

Open JBontes opened 6 years ago

JBontes commented 6 years ago

In the following snippet the automated section is not recognised.

type
  TX = class
  automated
    procedure Test; virtual; abstract;
  end;

The fix:

procedure TPasSyntaxTreeBuilder.VisibilityAutomated;
var
  Temp: TSyntaxNode;
begin
  Temp := FStack.Push(ntAutomated);
  try
    Temp.Attribute[anVisibility]:= AttributeValues[atTrue];
    inherited;
  finally
    FStack.Pop;
  end;
end;