Skip to content

Commit

Permalink
Define missing definitions for variables (#775)
Browse files Browse the repository at this point in the history
* Define missing definitions for variables

During publication of v45, I found that we were missing a number of terms that we actively use in the specification. Among these are:

- variable
- external variable
- local variable

This PR defines those terms.

* Update spec/syntax.md

* Address comments

Responding to @catamorphism's comment.

This change adopts the already-problematic phrase "resolved value", which is begging for us to define it.
  • Loading branch information
aphillips committed May 6, 2024
1 parent d3a59da commit 6db127f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ Attempting to parse a _message_ that is not _valid_ will result in a _Data Model

A **_<dfn>message</dfn>_** is the complete template for a specific message formatting request.

A **_<dfn>variable</dfn>_** is a _name_ associated to a resolved value.

An **_<dfn>external variable</dfn>_** is a _variable_
whose _name_ and initial value are supplied by the caller
to MessageFormat or available in the _formatting context_.
Only an _external variable_ can appear as an _operand_ in an _input declaration_.

A **_<dfn>local variable</dfn>_** is a _variable_ created as the result of a _local declaration_.

> [!NOTE]
> This syntax is designed to be embeddable into many different programming languages and formats.
> As such, it avoids constructs, such as character escapes, that are specific to any given file
Expand Down

0 comments on commit 6db127f

Please sign in to comment.