Skip to content

Commit bacb236

Browse files
gabriele-tomassettiadamretter
authored andcommitted
[feature] Add parsing support for rename expression
1 parent af07433 commit bacb236

File tree

1 file changed

+7
-1
lines changed
  • exist-core/src/main/antlr/org/exist/xquery/parser

1 file changed

+7
-1
lines changed

exist-core/src/main/antlr/org/exist/xquery/parser/XQuery.g

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,8 @@ exprSingle throws XPathException
724724
| ( "insert" ( "node" | "nodes" ) ) => xqufInsertExpr
725725
| ( "delete" ( "node" | "nodes" ) ) => xqufDeleteExpr
726726
| ( "replace" ( "value" | "node" ) ) => xqufReplaceExpr
727-
| ( "copy" DOLLAR) => copyModifyExpr
727+
| ( "rename" "node" ) => xqufRenameExpr
728+
| ( "copy" DOLLAR ) => copyModifyExpr
728729
| ( "invoke" "updating" ) => dynamicUpdFunCall
729730
| orExpr
730731
;
@@ -800,6 +801,11 @@ xqufReplaceExpr throws XPathException
800801
"replace"^ ("value" "of"!)? "node"! exprSingle "with"! exprSingle
801802
;
802803
804+
xqufRenameExpr throws XPathException
805+
:
806+
"rename"^ "node"! exprSingle "as"! exprSingle
807+
;
808+
803809
copyModifyExpr throws XPathException
804810
:
805811
"copy"^ letVarBinding ( COMMA! letVarBinding )*

0 commit comments

Comments
 (0)