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.
Terms
can 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") }.
VariantLists
are now deprecated and will be removed from the Syntax before version 1.0.All escapes sequences can only be used in
StringLiterals
now (see below).\UHHHHHH
is 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 useStringLiterals
instead, e.g.{"\u00A0"}
. - The closing curly brace character (
}
) is not allowed inTextElements
now. Please useStringLiterals
instead:{"}"}
. StringLiteral.value
was changed to store the unescaped ("cooked") value.StringLiteral.raw
has been added to store the raw value.- The AST of
CallExpressions
was changed to better accommodate the introduction of parameterizedTerms
. TheFunction
AST node has been replaced by theFunctionReference
node. - The leading dash (
-
) is no longer part of theIdentifier
node inTerms
andTermReferences
.