Пример #1
0
 @Override
 public boolean exit(ExpressionNode node) {
   if (NodeTreeUtils.parentHasNext(node)) {
     print(' ');
   }
   return super.exit(node);
 }
Пример #2
0
 @Override
 public boolean exit(SelectorNode node) {
   if (NodeTreeUtils.parentHasAnyFollowing(node, SelectorNode.class)) {
     print(',');
   }
   return super.exit(node);
 }
Пример #3
0
 @Override
 public boolean exit(FilterArgumentNode node) {
   if (NodeTreeUtils.parentHasNext(node)) {
     print(',').printOptional(' ');
   }
   return super.exit(node);
 }
Пример #4
0
 @Override
 public boolean exit(VariableDefinitionNode node) {
   print(";");
   if (node.getParent().getChildren().size() > 1 && NodeTreeUtils.parentHasNext(node)) {
     print(' ');
   }
   return super.exit(node);
 }
Пример #5
0
 @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);
 }
Пример #6
0
 @Override
 public boolean exit(PropertyNode node) {
   if (NodeTreeUtils.parentHasNext(node)) {
     print(";");
   } else {
     printOptional(";");
   }
   return super.exit(node);
 }