Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #110 from Trivadis/bugfix/issue-109-performance-sp…
Browse files Browse the repository at this point in the history
…lit-args

Bugfix/issue 109 performance split args
  • Loading branch information
PhilippSalvisberg committed Jun 9, 2021
2 parents 91397c0 + 0832a79 commit 26acadc
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions settings/sql_developer/trivadis_custom_format.arbori
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@ addLongDotted:
addToLongSet('parent');
}

allArgList:
[parent) paren_expr_list
;


splittableArgList1:
[parent) paren_expr_list
& [arg1) arg_list
Expand All @@ -302,11 +297,6 @@ splittableArgList:
| splittableArgList2
;


allExprList:
[parent) "(x,y,z)"
;

splittableExprList1:
[parent) "(x,y,z)"
& [arg1) "expr_list"
Expand Down Expand Up @@ -345,14 +335,15 @@ indentArgListParent:

splitArg:
.breaksProcArgs
& [node) arg
& allArgList.parent < node
& [node) arg
& allArgListParent < node
& [allArgListParent) paren_expr_list
& splittableArgList.parent < node
-> {
// filter via JavaScript
var all = tuple.get("allArgList.parent");
var splittable = tuple.get("splittableArgList.parent");
logger.fine(struct.getClass(), "splitArg (found): " + tuple.get('node'));
var all = tuple.get("allArgListParent");
var splittable = tuple.get("parent");
logger.fine(struct.getClass(), "splitArg (found) node: " + tuple.get('node'));
if (all == splittable) {
logger.fine(struct.getClass(), "splitArg (splitted): " + tuple.get('node'));
splittedNodeSet.add(tuple.get('node').interval());
Expand All @@ -364,12 +355,13 @@ splitExpr:
& [node) expr
& ![node^) assoc_arg
& ![node^) compound_expression
& allExprList.parent < node
& allExprListParent < node
& [allExprListParent) "(x,y,z)"
& splittableExprList.parent < node
-> {
// filter via JavaScript
var all = tuple.get("allExprList.parent");
var splittable = tuple.get("splittableExprList.parent");
var all = tuple.get("allExprListParent");
var splittable = tuple.get("parent");
logger.fine(struct.getClass(), "splitExpr (found): " + tuple.get('node'));
if (all == splittable) {
logger.fine(struct.getClass(), "splitExpr (splitted): " + tuple.get('node'));
Expand Down

0 comments on commit 26acadc

Please sign in to comment.