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 #vowelTags 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
TextElementproduction for text elements of thePattern. -
Added
annotationsandspanto allentrytypes.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
wordwhich replaceskeywordand changes its semantics:
wordscannot contain spaces. Space-separated sequences ofwordsare
calledsymbols.variant-keymay now be anumberor asymbol.Keywordis now calledSymbolin ASDL. -
Defined the behavior of backslash escapes as follows:
-
Escape sequences are only allowed in
textandquoted-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\uXXXXsequences). Using the actual character is
encouraged, however. -
Any other escaped characters result in a parsing error.
-
-
Changed the sigil for comments to
//. -
Renamed
SelectExpression'sexprfield toexpression. -
Renamed
Junk's andCommentsbodyfields tocontent. -
Renamed
CallExpression'sargsfield toarguments. -
Renamed
NamedArgument'svalfield tovalue. -
Renamed
keyword-argumenttonamed-argument -
Removed the list data type
Removed
LIST,LEN,TAKE,DROP.