This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Fixes #260, adding C++17 nested namespace decls. #263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First PR to this project, please let me know if I make any mistakes.
Requirements
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
All new code requires tests to ensure against regressions
Description of the Change
Modified the regex for namespace declarations to allow the nested namespaces introduced in C++17.
DID NOT add/modify any tests. Could someone tell me what file the tests are in so that I can update it?
Alternate Designs
I played around with a couple of regexes before realizing that the one above it, the using-namespace declaration, had a regex that would work. Regex is already complex to understand, so I used that one to maintain symmetry. Not that this does create two branches of the same regex, which might be somewhat dangerous.
Benefits
We will (hopefully) have highlighting support for C++17 nested namespaces.
Possible Drawbacks
If the regex is wrong, I just broke syntax highlighting on a lot of peoples' computers. Also I'm creating two copies of the same regex, which is a bit dangerous.
Applicable Issues
#260