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

Remove unescaped string literals from the AST #243

Closed
stasm opened this issue Feb 21, 2019 · 2 comments
Closed

Remove unescaped string literals from the AST #243

stasm opened this issue Feb 21, 2019 · 2 comments
Labels

Comments

@stasm
Copy link
Contributor

stasm commented Feb 21, 2019

With the reference resolver planned for the next quarter, I'm considering removing the unescaped version of string literals from the AST. The main motivation for adding it in #195 was to specify the unescaping mechanism precisely. We could still do that in a special-purpose reference function, with tests, for Fluent 1.0, and then move it into the resolver's spec in Q2.

This would be in line with how NumberLiterals only store the raw version of the number, too. See #242. The tooling use-cases that I'm aware of are interested in the raw string mostly, which allows running checks and serializing back to the same Fluent syntax. If the unescaping logic is provided as an independent function, other use-cases could benefit from it to cook the raw string and work with the unescaped one.

@stasm stasm added the syntax label Feb 21, 2019
@stasm
Copy link
Contributor Author

stasm commented Feb 21, 2019

This would fix #222 and help with #156.

@zbraniecki
Copy link
Collaborator

sgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants