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

Formatter loses comments in let statements #1767

Open
dplassgit opened this issue Dec 4, 2024 · 2 comments
Open

Formatter loses comments in let statements #1767

dplassgit opened this issue Dec 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working or is incorrect dslx:fmt DSLX auto-formatter dslx DSLX (domain specific language) implementation / front-end

Comments

@dplassgit
Copy link
Collaborator

dplassgit commented Dec 4, 2024

Similar to #1697 and #1739

To Reproduce
Format:

    let X = // before value
        u32:32;

Expected behavior
Output = input

Actual behavior
Comment is lost:

    let X = u32:32;

It also loses a comment between the value and the semicolon.

@dplassgit dplassgit added bug Something isn't working or is incorrect dslx DSLX (domain specific language) implementation / front-end dslx:fmt DSLX auto-formatter labels Dec 4, 2024
@dplassgit
Copy link
Collaborator Author

dplassgit commented Jan 6, 2025

A similar approach to how const was fixed in 4caeda4 is probably warranted.

@dplassgit dplassgit changed the title Formatter loses comment around a number Formatter loses comments in let statements Jan 6, 2025
@dplassgit dplassgit self-assigned this Jan 7, 2025
@dplassgit dplassgit moved this to In Progress in XLS usability Jan 7, 2025
@dplassgit
Copy link
Collaborator Author

It won't lose the comment anymore (as of 2398f4b)

But fixing it properly might be warranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or is incorrect dslx:fmt DSLX auto-formatter dslx DSLX (domain specific language) implementation / front-end
Projects
Status: In Progress
Development

No branches or pull requests

1 participant