Fluent Syntax Spec 0.3.0
Pre-release-
Added tags for language-specific grammatical information.
Tags are binary values attached to messages. They are language-specific and
can be used to describe grammatical characteristics of the message.brand-name = Firefox #masculine brand-name = Aurora #feminine #vowel
Tags can be used in select expressions by matching a hashtag name to the
message:has-updated = { brand-name -> [masculine] … [feminine] … *[other] … }
Tags can only be defined on messages which have a value and don't have any
attributes. -
The message body must be indented now.
Quoted strings are now only valid in placeables and cannot contain other
placeables. Removed|
for multiline blocks. -
Added
TextElement
production for text elements of thePattern
. -
Added
annotations
andspan
to allentry
types.Spans are
{ start, end }
productions. Annotations are{ code, args, message, span }
productions. -
Allowed more characters in keys.
Variant keys are now trimmed from both sides.
Introduced
word
which replaceskeyword
and changes its semantics:
words
cannot contain spaces. Space-separated sequences ofwords
are
calledsymbols
.variant-key
may now be anumber
or asymbol
.Keyword
is now calledSymbol
in ASDL. -
Defined the behavior of backslash escapes as follows:
-
Escape sequences are only allowed in
text
andquoted-text
. -
Newlines are preserved by the parser. This allows proper serialization.
-
Known escape sequences are:
\\
for the literal backslash,\"
for the
literal double quote,\{
for the literal opening brace and\u
followed by 4 hex digits for Unicode code points. Representing code
points from outside of the Basic Multilingual Plane is made possible with
surrogate pairs (two\uXXXX
sequences). Using the actual character is
encouraged, however. -
Any other escaped characters result in a parsing error.
-
-
Changed the sigil for comments to
//
. -
Renamed
SelectExpression
'sexpr
field toexpression
. -
Renamed
Junk
's andComment
sbody
fields tocontent
. -
Renamed
CallExpression
'sargs
field toarguments
. -
Renamed
NamedArgument
'sval
field tovalue
. -
Renamed
keyword-argument
tonamed-argument
-
Removed the list data type
Removed
LIST
,LEN
,TAKE
,DROP
.