Added support for keeping comments #3538
Merged
+134
−24
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 preprocess pass now preserves comments so they can be returned later if requested. Since shaderc now has to deal with comments that may contain identifiers, a new strFindUncommented() has been introduced to only match strings when they appear outside C/C++ style comments.
One issue is that fcpp when used with FPPTAG_KEEPCOMMENTS gets confused on $input/output lines if those contain unspaced comments:
Adding a space fixes the issue:
That is why
fs_bump.schas been changed. Not sure if you want this fixed and whether on fcpp or shaderc.