Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't parse System.Classes.pas #276

Open
chuacw opened this issue Mar 28, 2019 · 2 comments
Open

Can't parse System.Classes.pas #276

chuacw opened this issue Mar 28, 2019 · 2 comments

Comments

@chuacw
Copy link

chuacw commented Mar 28, 2019

When attempting to parse the RTL's System.Classes.pas in "C:\Program Files (x86)\Embarcadero\Studio\20.0\source\rtl\System.Classes.pas" throws the error:
First chance exception at $7744C5AF. Exception class EParserException with message ''Begin' expected found 'initialization''. Process ProjectIndexerResearch.exe (1936)

@sglienke
Copy link
Contributor

sglienke commented May 5, 2021

This issue is still the case and I found the cause:

DelphiAST cannot handle $IF SizeOf which makes it trip on TMemoryStream.SetCapacity which has two $IF checking SizeOf(LongInt) but no else causing all following routine being treated as nested to that method and eventually failing when arriving at initialization.

@bogdanpolak
Copy link

@RomanYankovsky I'd suggest adding help wanted label if you are open for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants