Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate VariantList and VariantExpression #215

Merged
merged 2 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions spec/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
on the second line of its value.
```

- Deprecate `VariantLists`. (#204)

`VariantLists` and `VariantExpression` have been deprecated. They will be
removed before Fluent 1.0 is released. Please use parameterized `Terms`
instead (see below).

- Introduce parameterized `Terms`. (#176)

References to `Terms` can now receive parameters which will be used by
Expand Down
2 changes: 2 additions & 0 deletions spec/fluent.ebnf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Attribute ::= line_end blank? "." Identifier blank_inline? "=" blank_i
Value ::= Pattern
| VariantList
Pattern ::= PatternElement+
/* DEPRECATION NOTICE VariantLists have been deprecated in Syntax 0.8. */
VariantList ::= blank? "{" variant_list blank? "}"

/* TextElement and Placeable can occur inline or as block.
Expand Down Expand Up @@ -79,6 +80,7 @@ Argument ::= NamedArgument
| InlineExpression
NamedArgument ::= Identifier blank? ":" blank? (StringLiteral | NumberLiteral)
AttributeExpression ::= (MessageReference | TermReference) "." Identifier
/* DEPRECATION NOTICE VariantExpressions have been deprecated in Syntax 0.8. */
VariantExpression ::= TermReference VariantKey

/* Block Expressions */
Expand Down
2 changes: 2 additions & 0 deletions syntax/grammar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ let Pattern = defer(() =>
.map(flatten(1))
.chain(list_into(FTL.Pattern)));

/* DEPRECATION NOTICE VariantLists have been deprecated in Syntax 0.8. */
let VariantList = defer(() =>
sequence(
maybe(blank),
Expand Down Expand Up @@ -314,6 +315,7 @@ let AttributeExpression = defer(() =>
.map(keep_abstract)
.chain(list_into(FTL.AttributeExpression)));

/* DEPRECATION NOTICE VariantExpressions have been deprecated in Syntax 0.8. */
let VariantExpression = defer(() =>
sequence(
TermReference.abstract,
Expand Down