public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = (Tree)getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexes(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { Tree child = getChild(c); child.setChildIndex(c); child.setParent(this); } }
public void sanityCheckParentAndChildIndexes(Tree parent, int i) { if ( parent!=this.getParent() ) { throw new IllegalStateException("parents don't match; expected "+parent+" found "+this.getParent()); } if ( i!=this.getChildIndex() ) { throw new IllegalStateException("child indexes don't match; expected "+i+" found "+this.getChildIndex()); } int n = this.getChildCount(); for (int c = 0; c < n; c++) { CommonTree child = (CommonTree)this.getChild(c); child.sanityCheckParentAndChildIndexes(this, c); } }
public void freshenParentAndChildIndexesDeeply(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { BaseTree child = (BaseTree)getChild(c); child.setChildIndex(c); child.setParent(this); child.freshenParentAndChildIndexesDeeply(); } }
public void freshenParentAndChildIndexesDeeply(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { BaseTree child = (BaseTree)getChild(c); child.setChildIndex(c); child.setParent(this); child.freshenParentAndChildIndexesDeeply(); } }
public void freshenParentAndChildIndexesDeeply(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { BaseTree child = (BaseTree)getChild(c); child.setChildIndex(c); child.setParent(this); child.freshenParentAndChildIndexesDeeply(); } }
public void freshenParentAndChildIndexesDeeply(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { BaseTree child = (BaseTree)getChild(c); child.setChildIndex(c); child.setParent(this); child.freshenParentAndChildIndexesDeeply(); } }
public void freshenParentAndChildIndexesDeeply(int offset) { int n = getChildCount(); for (int c = offset; c < n; c++) { BaseTree child = (BaseTree)getChild(c); child.setChildIndex(c); child.setParent(this); child.freshenParentAndChildIndexesDeeply(); } }
private Map<String, String> getTemplateOptions() { Map<String, String> opts = new HashMap<>(); BaseTree t = getChild(1); for (int i = 0; i < t.getChildCount(); i++) { TemplateOptionTree opt = (TemplateOptionTree) t.getChild(i); opt.go(this); opts.put(opt.getKey(), opt.getValue()); } return opts; }
private Map<String, String> getTemplateOptions() { Map<String, String> opts = new HashMap<>(); BaseTree t = getChild(1); for (int i = 0; i < t.getChildCount(); i++) { TemplateOptionTree opt = (TemplateOptionTree) t.getChild(i); opt.go(this); opts.put(opt.getKey(), opt.getValue()); } return opts; }
@Override @SuppressWarnings("rawtypes") protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BaseTree t = (BaseTree) oldInstance; for (int i = 0; i < t.getChildCount(); i++) { out.writeStatement(new Statement(oldInstance, "addChild", new Object[] { t.getChild(i) })); } } });