| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
package org.mozilla.javascript.ast; |
| 8 |
|
| 9 |
import org.mozilla.javascript.Token; |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
public class XmlMemberGet extends InfixExpression { |
| 20 |
|
| 21 |
{ |
| 22 |
type = Token.DOTDOT; |
| 23 |
} |
| 24 |
|
| 25 |
public XmlMemberGet() { |
| 26 |
} |
| 27 |
|
| 28 |
public XmlMemberGet(int pos) { |
| 29 |
super(pos); |
| 30 |
} |
| 31 |
|
| 32 |
public XmlMemberGet(int pos, int len) { |
| 33 |
super(pos, len); |
| 34 |
} |
| 35 |
|
| 36 |
public XmlMemberGet(int pos, int len, AstNode target, XmlRef ref) { |
| 37 |
super(pos, len, target, ref); |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
public XmlMemberGet(AstNode target, XmlRef ref) { |
| 45 |
super(target, ref); |
| 46 |
} |
| 47 |
|
| 48 |
public XmlMemberGet(AstNode target, XmlRef ref, int opPos) { |
| 49 |
super(Token.DOTDOT, target, ref, opPos); |
| 50 |
} |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
public AstNode getTarget() { |
| 57 |
return getLeft(); |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
public void setTarget(AstNode target) { |
| 65 |
setLeft(target); |
| 66 |
} |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
public XmlRef getMemberRef() { |
| 73 |
return (XmlRef)getRight(); |
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
public void setProperty(XmlRef ref) { |
| 82 |
setRight(ref); |
| 83 |
} |
| 84 |
|
| 85 |
@Override |
| 86 |
public String toSource(int depth) { |
| 87 |
StringBuilder sb = new StringBuilder(); |
| 88 |
sb.append(makeIndent(depth)); |
| 89 |
sb.append(getLeft().toSource(0)); |
| 90 |
sb.append(operatorToString(getType())); |
| 91 |
sb.append(getRight().toSource(0)); |
| 92 |
return sb.toString(); |
| 93 |
} |
| 94 |
} |