@Override public boolean exit(ExpressionNode node) { if (NodeTreeUtils.parentHasNext(node)) { print(' '); } return super.exit(node); }
@Override public boolean exit(SelectorNode node) { if (NodeTreeUtils.parentHasAnyFollowing(node, SelectorNode.class)) { print(','); } return super.exit(node); }
@Override public boolean exit(FilterArgumentNode node) { if (NodeTreeUtils.parentHasNext(node)) { print(',').printOptional(' '); } return super.exit(node); }
@Override public boolean exit(VariableDefinitionNode node) { print(";"); if (node.getParent().getChildren().size() > 1 && NodeTreeUtils.parentHasNext(node)) { print(' '); } return super.exit(node); }
@Override public boolean enter(RuleSetNode ruleSet) { if (_compress) { // Check if the inner scope contains nodes ScopeNode scope = NodeTreeUtils.getFirstChild(ruleSet, ScopeNode.class); return !scope.getChildren().isEmpty(); } return super.enter(ruleSet); }
@Override public boolean exit(PropertyNode node) { if (NodeTreeUtils.parentHasNext(node)) { print(";"); } else { printOptional(";"); } return super.exit(node); }