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

Parser bug with comments in #if #9894

Closed
aduros opened this issue Sep 23, 2020 · 2 comments
Closed

Parser bug with comments in #if #9894

aduros opened this issue Sep 23, 2020 · 2 comments
Labels

Comments

@aduros
Copy link
Contributor

aduros commented Sep 23, 2020

Works:

#if (debug)
#end 

Doesn't work but seems like it should:

#if (/* Hello */ debug)
#end 

Thanks!

@RealyUniqueName RealyUniqueName added this to the Bugs milestone Sep 24, 2020
@Simn
Copy link
Member

Simn commented Nov 13, 2020

This might be a bit tricky to fix because the parser operates in "raw" mode for these conditionals, which means that no token preprocessing takes place. Supporting this would require some kind of "almost raw" mode where it still discards comments.

@Simn
Copy link
Member

Simn commented Nov 13, 2020

Oh actually, we can do this at lexer level where we already discard whitespaces.

@Simn Simn closed this as completed in e53f0e9 Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants