fluent 0.10.0
Pre-releaseThis release brings support for version 0.8 of the Fluent Syntax spec. The API remains unchanged. Files written in valid Syntax 0.7 may not parse correctly in this release. See the summary of backwards-incompatible changes below.
-
Implement Fluent Syntax 0.8. (#303)
This is only a quick summary of the spec changes in Syntax 0.8. Consult the full changelog for details.
In multiline
Patterns, all common indent is now removed from each indented line in the final value of the pattern.multiline = This message has 2 spaces of indent on the second line of its value.Termscan now be parameterized via the call expression syntax.# A parametrized Term with a Pattern as a value. -thing = { $article -> *[definite] the thing [indefinite] a thing } this = This is { -thing(article: "indefinite") }.
VariantListsare now deprecated and will be removed from the Syntax before version 1.0.All escapes sequences can only be used in
StringLiteralsnow (see below).\UHHHHHHis a new escape sequence format suitable for codepoints above U+FFFF, e.g.{"\U01F602"}.
Backward-incompatible changes:
- The backslash character (
\) is now considered a regular character inTextElements. It's no longer possible to use escape sequences inTextElements. Please useStringLiteralsinstead, e.g.{"\u00A0"}. - The closing curly brace character (
}) is not allowed inTextElementsnow. Please useStringLiteralsinstead:{"}"}. StringLiteral.valuewas changed to store the unescaped ("cooked") value.StringLiteral.rawhas been added to store the raw value.- The AST of
CallExpressionswas changed to better accommodate the introduction of parameterizedTerms. TheFunctionAST node has been replaced by theFunctionReferencenode. - The leading dash (
-) is no longer part of theIdentifiernode inTermsandTermReferences.