From 980af527c7fd252b30f6e0318bbb078b8c076515 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 25 Jul 2023 21:46:45 +0300 Subject: [PATCH] Do not use variable rule within declaration --- spec/message.abnf | 2 +- spec/syntax.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/message.abnf b/spec/message.abnf index 30c3415584..423bd874dd 100644 --- a/spec/message.abnf +++ b/spec/message.abnf @@ -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)) diff --git a/spec/syntax.md b/spec/syntax.md index 099d5a4696..42081a2f5c 100644 --- a/spec/syntax.md +++ b/spec/syntax.md @@ -127,12 +127,12 @@ A _message_ consists of two parts: ### Declarations -A **_declaration_** 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 **_declaration_** 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