Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Addison Phillips <[email protected]>
  • Loading branch information
eemeli and aphillips authored Aug 28, 2023
1 parent 0d38d03 commit f0eabbf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions exploration/0002-expression-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ Attributes are distinct from function options.
Common attributes are defined by the MF2 specification
and must be supported by all implementations.

Attributes should be user-definable.
Users may define their own attributes.

Attributes with a runtime impact should not be considered comments.
Implementations may define their own attributes.

Attributes should relate to a specific expression.
Some attributes may have an effect on the formatting of an expression.
These cannot be defined within comments either within or outside a message.

Each attribute relates to a specific expression.

An attribute's scope is limited to the expression to which it relates.

Multiple attributes should be assignable to a single expression.

Expand All @@ -83,6 +88,10 @@ the reserved/private-use rules will need to be adjusted to support attributes.

Add support for option-like `@key=value` attribute pairs at the end of any expression.

If the syntax for function options is extended to support flag-like options
(see <a href="https://github.com/unicode-org/message-format-wg/issues/386">#386</a>),
also extend expression attribute syntax to match.

To distinguish expression attributes from options,
require `@` as a prefix for each attribute asignment.
Examples: `@translate=yes` and `@locale=$exprLocale`.
Expand Down

0 comments on commit f0eabbf

Please sign in to comment.