| 1 | /* This file was generated by SableCC (http://www.sablecc.org/). */ |
| 2 | |
| 3 | package uk.co.zonetora.fj.ast.node; |
| 4 | |
| 5 | import uk.co.zonetora.fj.ast.analysis.*; |
| 6 | |
| 7 | public final class X1PCommaField extends XPCommaField |
| 8 | { |
| 9 | private XPCommaField _xPCommaField_; |
| 10 | private PCommaField _pCommaField_; |
| 11 | |
| 12 | public X1PCommaField() |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | public X1PCommaField( |
| 17 | XPCommaField _xPCommaField_, |
| 18 | PCommaField _pCommaField_) |
| 19 | { |
| 20 | setXPCommaField(_xPCommaField_); |
| 21 | setPCommaField(_pCommaField_); |
| 22 | } |
| 23 | |
| 24 | public Object clone() |
| 25 | { |
| 26 | throw new RuntimeException("Unsupported Operation"); |
| 27 | } |
| 28 | |
| 29 | public void apply(Switch sw) |
| 30 | { |
| 31 | throw new RuntimeException("Switch not supported."); |
| 32 | } |
| 33 | |
| 34 | public XPCommaField getXPCommaField() |
| 35 | { |
| 36 | return _xPCommaField_; |
| 37 | } |
| 38 | |
| 39 | public void setXPCommaField(XPCommaField node) |
| 40 | { |
| 41 | if(_xPCommaField_ != null) |
| 42 | { |
| 43 | _xPCommaField_.parent(null); |
| 44 | } |
| 45 | |
| 46 | if(node != null) |
| 47 | { |
| 48 | if(node.parent() != null) |
| 49 | { |
| 50 | node.parent().removeChild(node); |
| 51 | } |
| 52 | |
| 53 | node.parent(this); |
| 54 | } |
| 55 | |
| 56 | _xPCommaField_ = node; |
| 57 | } |
| 58 | |
| 59 | public PCommaField getPCommaField() |
| 60 | { |
| 61 | return _pCommaField_; |
| 62 | } |
| 63 | |
| 64 | public void setPCommaField(PCommaField node) |
| 65 | { |
| 66 | if(_pCommaField_ != null) |
| 67 | { |
| 68 | _pCommaField_.parent(null); |
| 69 | } |
| 70 | |
| 71 | if(node != null) |
| 72 | { |
| 73 | if(node.parent() != null) |
| 74 | { |
| 75 | node.parent().removeChild(node); |
| 76 | } |
| 77 | |
| 78 | node.parent(this); |
| 79 | } |
| 80 | |
| 81 | _pCommaField_ = node; |
| 82 | } |
| 83 | |
| 84 | void removeChild(Node child) |
| 85 | { |
| 86 | if(_xPCommaField_ == child) |
| 87 | { |
| 88 | _xPCommaField_ = null; |
| 89 | } |
| 90 | |
| 91 | if(_pCommaField_ == child) |
| 92 | { |
| 93 | _pCommaField_ = null; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void replaceChild(Node oldChild, Node newChild) |
| 98 | { |
| 99 | } |
| 100 | |
| 101 | public String toString() |
| 102 | { |
| 103 | return "" + |
| 104 | toString(_xPCommaField_) + |
| 105 | toString(_pCommaField_); |
| 106 | } |
| 107 | } |