Skip to content

Commit f6f09f0

Browse files
gabriele-tomassettiadamretter
authored andcommitted
[feature] Add intermediate AST support for delete expression
1 parent b57fed7 commit f6f09f0

File tree

1 file changed

+22
-0
lines changed
  • exist-core/src/main/antlr/org/exist/xquery/parser

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,8 @@ throws PermissionDeniedException, EXistException, XPathException
21982198
|
21992199
step=xqufInsertExpr [path]
22002200
|
2201+
step=xqufDeleteExpr [path]
2202+
|
22012203
step=transformWithExpr [path]
22022204
|
22032205
step=copyModifyExpr [path]
@@ -3930,6 +3932,26 @@ throws XPathException, PermissionDeniedException, EXistException
39303932
)
39313933
;
39323934

3935+
xqufDeleteExpr [PathExpr path]
3936+
returns [Expression step]
3937+
throws XPathException, PermissionDeniedException, EXistException
3938+
{
3939+
}:
3940+
#(
3941+
deleteAST:"delete"
3942+
{
3943+
PathExpr target = new PathExpr(context);
3944+
}
3945+
step=expr [target]
3946+
{
3947+
DeleteExpr deleteExpr = new DeleteExpr(context, target);
3948+
deleteExpr.setASTNode(deleteAST);
3949+
path.add(deleteExpr);
3950+
step = deleteExpr;
3951+
}
3952+
)
3953+
;
3954+
39333955
mapConstr [PathExpr path]
39343956
returns [Expression step]
39353957
throws XPathException, PermissionDeniedException, EXistException

0 commit comments

Comments
 (0)