Johan Bontes
Johan Bontes
Fixed error with the forward keyword. Added forward attribute if standalone proc is forwarded in the implementation section
Note that #224 also fixes a slight issue where the `SyntaxNodeNames` got out of sync with the `SyntaxNodeTypes` (My bad). Also note that #224 allows you to put the operators...
The following code will not process correctly ``` unit TestAST; interface implementation procedure test; var x: array of string; begin x[10]:= 'test'; x(.11.):= 'test2'; end; end. ``` The `11` will...
If I add a new operator and mix up the definition for `TOperators`, DelphiAST will not complain. A simple fix solves this issue, forcing the two structures to be in...
```Delphi unit PlusIsTest; interface implementation procedure TScriptlet.InitControlData; asm mov eax,10 end; end. ``` is recorded as: ```XML ``` The fix: ```Delphi procedure TPasSyntaxTreeBuilder.AsmFragment; begin FStack.AddValuedChild(ntAsmFragment, Lexer.Token); inherited; end; procedure TPasSyntaxTreeBuilder.AsmStatement;...
This snippet: ```Delphi unit Test; interface implementation procedure TScriptlet.InitControlData; begin TControlData2(CControlData).FirstEventOfs := UIntPtr(@@FOnonscriptletevent) - UIntPtr(Self); TControlData2(CControlData).FirstEventOfs := UIntPtr(@FOnonscriptletevent) - UIntPtr(Self); end; end. ``` Is recorded as: ```XML //Incorrect, no ADDR...
The following code: ```Delphi ... procedure FailFmt(args: array of const); procedure FailFmt2(args: array of string); ... ``` Gets parsed as: ```XML ... ... ... ``` The `const` keyword is incorrectly...
For now we should simply record any compiler directives. In future we should have some parsing for the directives. The fix: ```Delphi procedure TPasSyntaxTreeBuilder.CompilerDirective; begin FStack.AddValuedChild(ntCompilerDirective, Lexer.Token); inherited; end; procedure...
```Delphi var x: integer; y: integer absolute x; ``` The `absolute` is not recorded. and the `x` is recorded as if it was a value assigned to the variable. The...
The fix: ```Delphi function TPasSyntaxTreeBuilder.Run(SourceStream: TStream): TSyntaxNode; begin Result:= nil; try FStack.Clear; try self.OnMessage := ParserMessage; inherited Run('', SourceStream); finally Result:= FStack.Peek; FStack.Pop; end; except on E: EParserException do raise...