GetTarget() public method

Returns the object on which the element is being fetched.
Returns the object on which the element is being fetched.
public GetTarget ( ) : AstNode
return AstNode
Beispiel #1
0
		private Node TransformElementGet(ElementGet node)
		{
			// OPT: could optimize to createPropertyGet
			// iff elem is string that can not be number
			Node target = Transform(node.GetTarget());
			decompiler.AddToken(Token.LB);
			Node element = Transform(node.GetElement());
			decompiler.AddToken(Token.RB);
			return new Node(Token.GETELEM, target, element);
		}
Beispiel #2
0
		// only used for destructuring forms
		internal void DecompileElementGet(ElementGet node)
		{
			Decompile(node.GetTarget());
			decompiler.AddToken(Token.LB);
			Decompile(node.GetElement());
			decompiler.AddToken(Token.RB);
		}