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

support inline comments in asm #include lines #823

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Dec 25, 2023

(see commit message)

Fixes #812.

That is, the assembly line

    #include "foo.h" // bar

would make garble run into an error, as we would try to parse
the #include directive before we stripped comments,
effectively trying to unquote the string

    "foo.h" // bar

rather than just the included filename

    "foo.h"

Add test cases for asm but also cgo, while at it.

Fixes burrowers#812.
Copy link
Member

@pagran pagran left a comment

Choose a reason for hiding this comment

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

just in case, comments of the /* inline comment */ format exist ?

@mvdan
Copy link
Member Author

mvdan commented Dec 25, 2023

They apparently do, and we should probably handle them too. Want to raise an issue? We should tackle that separately.

@mvdan mvdan merged commit bdfa619 into burrowers:master Dec 25, 2023
5 checks passed
@mvdan mvdan deleted the asm-comments branch December 25, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Invalid syntax when using garble to build
2 participants