-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
The definition of the @function syntax is:
<pre class="prod def" nohighlight>
<@function> = @function <<function-token>> <<function-parameter>>#? )
[ returns <<css-type>> ]?
{
<<declaration-rule-list>>
}
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<default-value>> ]?
<dfn><<css-type>></dfn> = <<syntax-component>> | <<@function/type()>>
<dfn><<default-value>></dfn> = <<declaration-value>>
<dfn function lt="type()" for="@function"><type()></dfn> = type( <<syntax>> )
</pre>The literal close-paren ()) that follows the <function-parameter> list is represented, but the open paren (() that should fall between the <function-token> and the (optional) parameter list is not.
The simplest solution is for the grammar to read:
<pre class="prod def" nohighlight>
<@function> = @function <<function-token>> ( <<function-parameter>>#? )
[ returns <<css-type>> ]?
{
<<declaration-rule-list>>
}
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<default-value>> ]?
<dfn><<css-type>></dfn> = <<syntax-component>> | <<@function/type()>>
<dfn><<default-value>></dfn> = <<declaration-value>>
<dfn function lt="type()" for="@function"><type()></dfn> = type( <<syntax>> )
</pre>Unless <function-token> is meant to include the open-paren, but since it isn't defined that way anywhere (formally or informally), that seems unlikely.
(Also, it would make more sense structurally if <function-token> were then defined to include not only the open-paren, but also the argument list and the close-paren. Its definition could then be decomposed further.)
Metadata
Metadata
Assignees
Labels
No labels