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

Refactor the parsing of port names in visual shader's expressions #83956

Merged
1 commit merged into from
Mar 24, 2024

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Oct 25, 2023

I've decided to rewrite that part of the code to prevent further exclusion of control symbols (and easing up the code itself by removing the needing of running multiple loops for each symbol).

Now, only the symbols (before and after the expression) which may be a part of other identifiers (underscore symbol '_', A-Z, a-z, 0-9) will make the string replacing of port names in the expression to be failed.

@Chaosus Chaosus requested a review from a team as a code owner October 25, 2023 16:40
@Chaosus Chaosus added this to the 4.3 milestone Oct 25, 2023
@Chaosus Chaosus force-pushed the vs_expression_parsing branch 2 times, most recently from cea88b8 to 92da7ca Compare October 25, 2023 16:52
Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that this fixes the bug!
Should be good to go, the refactoring suggestion isn't a blocker :)

scene/resources/visual_shader.cpp Outdated Show resolved Hide resolved
scene/resources/visual_shader.cpp Show resolved Hide resolved
scene/resources/visual_shader.h Show resolved Hide resolved
@Chaosus Chaosus force-pushed the vs_expression_parsing branch from 92da7ca to aa12241 Compare March 21, 2024 13:34
@Chaosus
Copy link
Member Author

Chaosus commented Mar 21, 2024

Yes, thanks @Geometror, I think I've completed with all of your remarks.

akien-mga added a commit that referenced this pull request Mar 24, 2024
Refactor the parsing of port names in visual shader's expressions
@akien-mga akien-mga closed this pull request by merging all changes into godotengine:master in 06abc86 Mar 24, 2024
@akien-mga
Copy link
Member

Thanks!

@Chaosus Chaosus deleted the vs_expression_parsing branch March 24, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VisualShader's Expression parse error when variable no space
4 participants