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

Source-code beautify #if indenting does not respect comments #270

Closed
ghost opened this issue Jul 10, 2023 · 2 comments
Closed

Source-code beautify #if indenting does not respect comments #270

ghost opened this issue Jul 10, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 10, 2023

_indentIfdef doesn't check if the preprocessor is at the start of the line or in a comment, so even a line with a comment containing #if will mess up the indentation:

input:

/* #if */
/* #if */
/* #if */
/* #if */
/* #if */

output:

    /* #if */
        /* #if */
            /* #if */
                /* #if */
                    /* #if */
@sebavan
Copy link
Member

sebavan commented Jul 10, 2023

I would say #269 is the best workaround for it as it is hard to figure whether the tokens are in comments or not.

Would be great to have a fully fledged beautifier :-)

@sebavan
Copy link
Member

sebavan commented Aug 30, 2023

closing in favor of #283

Spector has never been thought as a tool to help during shader development and it would be great to enhance this area.

@sebavan sebavan closed this as completed Aug 30, 2023
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

No branches or pull requests

1 participant