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

Fixing bug in the preprocessor when use "\r" as a newline character #12

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

06wj
Copy link
Contributor

@06wj 06wj commented Jan 13, 2024

Some shader files use "\r" as a newline character, an error will be reported when using it.
image

@AndrewRayCode AndrewRayCode self-requested a review January 27, 2024 19:36
@AndrewRayCode
Copy link
Collaborator

Nice, thank you! And thanks for the test as well.

@AndrewRayCode
Copy link
Collaborator

There's probably some subtle bugs in the primary grammar too - I see

single_comment = $('//' [^\n]*)

and (for non preprocessed shaders)

preprocessor "prepocessor" = line:$('#' [^\n]*) _:_? { return node('preprocessor', { line, _ }); }

@AndrewRayCode AndrewRayCode merged commit 829c252 into ShaderFrog:main Jan 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants