-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix scan failures on nested compiler directives #262
Conversation
This type was exposed through public methods, so it shouldn't be package-private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good overall. I've left a couple of questions and nit-picky suggestions.
delphi-frontend/src/main/antlr3/au/com/integradev/delphi/antlr/Delphi.g
Outdated
Show resolved
Hide resolved
delphi-frontend/src/main/antlr3/au/com/integradev/delphi/antlr/Delphi.g
Outdated
Show resolved
Hide resolved
...c/test/java/au/com/integradev/delphi/preprocessor/directive/CompilerDirectiveParserTest.java
Outdated
Show resolved
Hide resolved
...c/main/java/au/com/integradev/delphi/preprocessor/directive/CompilerDirectiveParserImpl.java
Show resolved
Hide resolved
...rc/main/java/au/com/integradev/delphi/preprocessor/directive/expression/ExpressionLexer.java
Show resolved
Hide resolved
6875948
to
e7e4f26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're handling all those pesky edge cases now. Everything looks good, although I think you duplicated a test case in one of the resources.
delphi-frontend/src/test/resources/au/com/integradev/delphi/preprocessor/Expressions.pas
Outdated
Show resolved
Hide resolved
Compiler directives (and comments) can appear nested within the constant expressions of `{$if}` and `{$elseif}` directives.
e7e4f26
to
434e3e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This PR:
Token.TokenType
to public visibility (incidental QA)IF
directive:{$ifǣ <> 123}
Note that this does not add proper support or evaluation for nested compiler directives.
That would be quite challenging to accomplish without first doing #261.
Fixes #260.