W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

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

From: <bugzilla@jessica.w3.org>
Date: Sat, 19 Nov 2016 18:00:32 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-30015-523-hHPKm31E6y@http.www.w3.org/Bugs/Public/>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC