Skip to content

Conversation

@zero9178
Copy link
Member

@zero9178 zero9178 commented Sep 8, 2023

The current printer of StringRefParameter simply prints out the content of the string as is without escaping it any way. This leads to it generating invalid syntax, causing parser errors when read in again.

This PR fixes that by adding printString to AsmPrinter, allowing one to print a string that can be parsed with parseString, using the same escaping syntax as StringAttr.

The current printer of `StringRefParameter` simply prints out the content of the string as is without escaping it any way. This leads to it generating invalid syntax, causing parser errors when read in again.

This PR fixes that by adding ´printString` to `AsmPrinter`, allowing one to print a string that can be parsed with `parseString`, using the same escaping syntax as `StringAttr`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants