Skip to content

Do not use variable rule within declaration #440

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion spec/message.abnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message = [s] *(declaration [s]) body [s]

declaration = let s variable [s] "=" [s] expression
declaration = let s "$" name [s] "=" [s] expression
body = pattern
/ (selectors 1*([s] variant))

Expand Down
6 changes: 3 additions & 3 deletions spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ A _message_ consists of two parts:

### Declarations

A **_<dfn>declaration</dfn>_** binds a _variable_ identifier to the value of an _expression_ within the scope of a _message_.
This local variable can then be used in other _expressions_ within the same _message_.
A **_<dfn>declaration</dfn>_** binds a _name_ to the value of an _expression_ within the scope of a _message_.
This _name_ can then be used in _variables_ within the same _message_.
_Declarations_ are optional: many messages will not contain any _declarations_.

```abnf
declaration = let s variable [s] "=" [s] expression
declaration = let s "$" name [s] "=" [s] expression
```

### Body
Expand Down