Closed darnocian closed 3 years ago
Found the following scenario doesn't parse:
type TRecord = record Event: integer; end align {$IFDEF DEBUG} 16 {$ENDIF};
Above is just a mini version of what I found in SysUtils that resulted in the failure.
I'll check the code next.
So I was wondering if there should not be a default set of defines in the examples so we can see some of the built in delphi units passing.
Try TDelphiAST.InitDefinesDefinedByCompiler()
end align {$IFDEF DEBUG} 16 {$ENDIF};
Interesting case. align
keyword there is not supported by parser. I'll fix that.
Yeah, was interesting. I have not used that feature yet either.
Thanks for highlighting InitDefinesDefinedByCompiler(). I must have been blind.
I started trying to introduce align, but am glad to observe the change for next time ;)
Hi Roman. I was experimenting with adding the align keyword. I managed to get the parser to work, but wasn't sure how to get the packed size into the xml node structure as an attribute. I'm happy to submit a pull request for review.
Of course, please submit a PR
I think I sorted it out. PR #311
Looks like issue is with {$IFDEF...}
I started adding defines to the lexer and the error has moved along, so will be looking at identifying the next issue.
So I was wondering if there should not be a default set of defines in the examples so we can see some of the built in delphi units passing.
I'll post back or submit something when I discover more.