On Monday, 28 July 2014 at 19:12:49 UTC, Timon Gehr wrote:
I'd suggest to just special case the general thing, or not add
any special cases at all.
catch(Type)
^~~~~~
I.e. use lookahead to determine whether something that looks
like a type follows a '(' token and is itself followed by a ')'
token.
This doesn't help.
catch (Type).functionName() is valid both as
LastCatch
PostfixExpression
PostfixExpression
PostfixExpression
PrimaryExpression
'(' Type ')'
'.' identifier
'(' ')'
And as
Catch
'(' Type ')'
PrimaryExpression
'.'
PostfixExpression
PrimaryExpression
'functionName'
'(' ')'