You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In line with my feedback from projectfluent/fluent.js#310, I'd like to suggest that we rename the main field of the StringLiteral to value and keep the optimization we have as value today with a new name like encoded which we could then mark as "optional" for implementations to introduce.
This would allow us to maybe remove the encoded field from test fixtures since it's an optimization for the fluent.js, rather than part of the reference AST. (or mark that field as optional for tests to pass).
The text was updated successfully, but these errors were encountered:
stasm
transferred this issue from projectfluent/fluent.js
Nov 30, 2018
(I moved this issue to the spec repo since it affects the reference parser.)
In line with my feedback from projectfluent/fluent.js#310, I'd like to suggest that we rename the main field of the StringLiteral to value and keep the optimization we have as value today with a new name like encoded which we could then mark as "optional" for implementations to introduce.
The current design, including naming, was based on #195 (comment). The goal of adding the unescaped value to the AST was to standardize how escape sequences are intended to work. Before, the expected behavior wasn't specified at all.
The escape sequences can be unescaped statically during parsing, which makes the AST more usable. For tooling, the raw field is available, too. I see both fields as essential parts of the reference parser.
This would allow us to maybe remove the encoded field from test fixtures since it's an optimization for the fluent.js, rather than part of the reference AST. (or mark that field as optional for tests to pass).
I see a difference between the reference parser and the reference AST. As I think I mentioned before, I think the implementations should be free to use any AST they are most comfortable with, and are only required to be able to serialize it into a reference-compliant JSON structure.
Uh oh!
There was an error while loading. Please reload this page.
In line with my feedback from projectfluent/fluent.js#310, I'd like to suggest that we rename the main field of the StringLiteral to
value
and keep the optimization we have asvalue
today with a new name likeencoded
which we could then mark as "optional" for implementations to introduce.This would allow us to maybe remove the
encoded
field from test fixtures since it's an optimization for the fluent.js, rather than part of the reference AST. (or mark that field as optional for tests to pass).The text was updated successfully, but these errors were encountered: