[Bug 30015] TransformWithExpr and ArrowExpr grammar entries conflict for Update Facility 3.1

https://www.w3.org/Bugs/Public/show_bug.cgi?id=30015

--- Comment #3 from Reece H. Dunn <msclrhd@gmail.com> ---
Another option would be to place ArrowExpr and TransformWithExpr at the same
level:

    CastExpr ::= (ArrowExpr | TransformWithExpr) ( "cast" "as" SingleType )?
    ArrowExpr ::= UnaryExpr ( "=>" ArrowFunctionSpecifier ArgumentList )*
    TransformWithExpr ::= UnaryExpr ( "transform" "with" "{" Expr? "}" )?

This would mean that ArrowExpr and TransformWithExpr cannot be used in the same
expression without parenthesis. This would probably be the best option, as
otherwise there is the issue of how to handle multiple arrows, as in:

    $x => f() transform with {} => g()

A use case for mixing the two would be in something like:

    $x => doc() transform with { rename node . as "abc" }

which could be done with parenthesis if required:

    ($x => doc()) transform with { rename node . as "abc" }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 19 November 2016 18:00:38 UTC