Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Handle whitespace within C++ preprocessor comments #127

Merged
merged 1 commit into from
May 11, 2021
Merged

Handle whitespace within C++ preprocessor comments #127

merged 1 commit into from
May 11, 2021

Conversation

mattgodbolt
Copy link
Contributor

With reference to: compiler-explorer/compiler-explorer#879, code like:

#if defined(__has_include)
    #if __has_include(<io.h>)
        #include <io.h>
    #endif 
#endif 

would not be coloured correctly. The @whitespace token ate up the leading whitespace before getting to the ^\s* so the ^ wouldn't match. Additionally, there can be whitespace before the include of #include

@mattgodbolt
Copy link
Contributor Author

Hey @alexdima - just a small ping on this. I'd love to get this in the next release if possible :)

@alexdima alexdima added this to the April 2021 milestone May 11, 2021
@alexdima
Copy link
Member

Thank you!

@alexdima alexdima merged commit 273f426 into microsoft:main May 11, 2021
@mattgodbolt mattgodbolt deleted the prepro-fixwes branch May 11, 2021 13:32
@mattgodbolt
Copy link
Contributor Author

Thanks for your tireless work on making Monaco awesome :)

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

Successfully merging this pull request may close these issues.

2 participants