Open
Description
How to differ between IdentifierPattern and PathPattern when they can be just IDENTIFIER?
Pattern can be either IdentifierPattern or PathPattern.
Rules applied:
Pattern: IdentifierPattern
Pattern->IdentifierPattern
IdentifierPattern: ref? mut? IDENTIFIER (@ Pattern ) ?
IdentifierPattern->IDENTIFIER
And for the PathPattern
PathPattern: PathInExpression
PathPattern->PathInExpression
PathInExpression: ::? PathExprSegment (:: PathExprSegment)*
PathInExpression->PathExprSegment
PathExprSegment:PathIdentSegment (:: GenericArgs)?
PathExprSegment->PathIdentSegment
PathIdentSegment:IDENTIFIER
PathIdentSegment->IDENTIFIER
Not sure if there is a BIGGER rule to solve this out, or just we don't care at the parsing stage, but how to decide is this IDENTIFIER a IdentifierPattern or PathPattern?