@Override public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
@Override public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
@Override public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
@Override public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
@Override public boolean isNil(Object tree) { return ((Tree)tree).isNil(); }
public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
@Override public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
@Override public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
@Override public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
@Override public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
@Override public void setChild(int i, Tree t) { if ( t==null ) { return; } if ( t.isNil() ) { throw new IllegalArgumentException("Can't set single child to a list"); } if ( children==null ) { children = createChildrenList(); } children.set(i, t); t.setParent(this); t.setChildIndex(i); }
/** Transform ^(nil x) to x and nil to null */ public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = (Tree)r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }
/** Transform ^(nil x) to x and nil to null */ @Override public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }
/** Transform ^(nil x) to x and nil to null */ @Override public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }
/** Transform ^(nil x) to x and nil to null */ @Override public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }
/** Transform ^(nil x) to x and nil to null */ @Override public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }
/** Transform ^(nil x) to x and nil to null */ @Override public Object rulePostProcessing(Object root) { //System.out.println("rulePostProcessing: "+((Tree)root).toStringTree()); Tree r = (Tree)root; if ( r!=null && r.isNil() ) { if ( r.getChildCount()==0 ) { r = null; } else if ( r.getChildCount()==1 ) { r = r.getChild(0); // whoever invokes rule will set parent and child index r.setParent(null); r.setChildIndex(-1); } } return r; }