It should be
var a = (function () type function ()) like AAA
In other words, your first option
var a = FunctionExpression like AAA
where AAA must be a TypeExpression.
Jd
On 4/1/08 8:37 PM, Eric Suen wrote:
> Hi,
>
> the statement is:
>
> var a = function() type function() like AAA
>
> RelationalExpression ::= RelationalExpression like TypeExpression
>
> RelationalExpression -> PostfixExpression -> PrimaryExpression
> -> FunctionExpression
>
> FunctionExpression ::= function FunctionSignature FunctionExpressionBody
>
> FunctionExpressionBody ::= AssignmentExpression
>
> AssignmentExpression -> ConditionalExpression -> UnaryTypeExpression
> -> type TypeExpression -> type FunctionType
> -> type function FunctionSignature
>
> FunctionSignature ::= TypeParameters '(' Parameters ')' ResultType
>
> ResultType ::= $empty
> | ':' 'void'
> | ':' TypeExpression
> | 'like' TypeExpression -- conflict on this rule with $empty
>
> So, is it
> var a = FunctionExpression like AAA
> or
> var a = function() type FunctionType
>
>
> ----- Original Message -----
> From: "Eric Suen" <[EMAIL PROTECTED]>
> Newsgroups: gmane.comp.lang.javascript.ecmascript4.general
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 01, 2008 7:35 PM
> Subject: Re: grammar update
>
>
>> Page 11
>> FunctionDeclaration ::= function FunctionName FunctionSignature
>> should be
>> FunctionDeclarationW ::= function FunctionName FunctionSignature SemicolonW
>>
>> following statement:
>> type function() like AAA
>>
>> Should it be:
>> RelationalExpression like TypeExpression (like is operator)
>> [type function()] like [AAA]
>> or
>> type FunctionType (like is ResultType)
>> type [function() like AAA]
>>
>> Regards,
>>
>> Eric Suen
>
>
> _______________________________________________
> Es4-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es4-discuss
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss