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

Update Transpiler string method to respect AST quoteStyle option for AstExprConstantString #1114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xgladius
Copy link
Contributor

AstExprConstantString's quoteStyle field was disregarded during the process of transpiling, this change fixes that and keeps original behavior for all other calls to writer.string.

@@ -49,7 +49,7 @@ struct Writer
virtual void keyword(std::string_view) = 0;
virtual void symbol(std::string_view) = 0;
virtual void literal(std::string_view) = 0;
virtual void string(std::string_view) = 0;
virtual void string(std::string_view, bool quoted = true) = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be better to avoid default argument values and update the second call to string instead (there are only 2 calls).

@vegorov-rbx
Copy link
Collaborator

This PR is missing tests (in Transpiler.test.cpp). It's not obvious what code was even transpiled incorrectly.

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.

None yet

2 participants