Skip to content

Commit

Permalink
Calling convention attribute added
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanYankovsky committed Apr 18, 2015
1 parent 6295b53 commit f7036c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Source/DelphiAST.Consts.pas
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,13 @@ interface


const
sENUM = 'enum';
sNAME = 'name';
sPATH = 'path';
sSUBRANGE = 'subrange';
sTYPE = 'type';
sVALUE = 'value';
sCALLINGCONVENTION = 'callingconvention';
sENUM = 'enum';
sNAME = 'name';
sPATH = 'path';
sSUBRANGE = 'subrange';
sTYPE = 'type';
sVALUE = 'value';

implementation

Expand Down
7 changes: 7 additions & 0 deletions Source/DelphiAST.pas
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ TPasSyntaxTreeBuilder = class(TmwSimplePasPar)
procedure Designator; override;
procedure DestructorName; override;
procedure DirectiveBinding; override;
procedure DirectiveCalling; override;
procedure DotOp; override;
procedure ElseStatement; override;
procedure EmptyStatement; override;
Expand Down Expand Up @@ -734,6 +735,12 @@ procedure TPasSyntaxTreeBuilder.DirectiveBinding;
inherited;
end;

procedure TPasSyntaxTreeBuilder.DirectiveCalling;
begin
FStack.Peek.SetAttribute(sCALLINGCONVENTION, Lexer.Token);
inherited;
end;

procedure TPasSyntaxTreeBuilder.DotOp;
begin
FStack.AddChild(ntDot, False);
Expand Down

0 comments on commit f7036c8

Please sign in to comment.