1 package persistence.antlr; 2 3 8 9 class TreeSpecifierNode { 10 private TreeSpecifierNode parent = null; 11 private TreeSpecifierNode firstChild = null; 12 private TreeSpecifierNode nextSibling = null; 13 private Token tok; 14 15 16 TreeSpecifierNode(Token tok_) { 17 tok = tok_; 18 } 19 20 public TreeSpecifierNode getFirstChild() { 21 return firstChild; 22 } 23 24 public TreeSpecifierNode getNextSibling() { 25 return nextSibling; 26 } 27 28 public TreeSpecifierNode getParent() { 30 return parent; 31 } 32 33 public Token getToken() { 34 return tok; 35 } 36 37 public void setFirstChild(TreeSpecifierNode child) { 38 firstChild = child; 39 child.parent = this; 40 } 41 42 public void setNextSibling(TreeSpecifierNode sibling) { 44 nextSibling = sibling; 45 sibling.parent = parent; 46 } 47 } 48 | Popular Tags |