C# Class Rhino.Ast.NewExpression

New expression.
New expression. Node type is Rhino.Token.NEW .

NewExpression : MemberExpression new NewExpression
This node is a subtype of FunctionCall , mostly for internal code sharing. Structurally a NewExpression node is very similar to a FunctionCall , so it made a certain amount of sense.
Inheritance: FunctionCall
Show file Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
GetInitializer ( ) : ObjectLiteral

Returns initializer object, if any.

Returns initializer object, if any.

NewExpression ( ) : System.Text
NewExpression ( int pos ) : System.Text
NewExpression ( int pos, int len ) : System.Text
SetInitializer ( ObjectLiteral initializer ) : void

Sets initializer object.

Sets initializer object. Rhino supports an experimental syntax of the form new expr [ ( arglist ) ] [initializer] , in which initializer is an object literal that is used to set additional properties on the newly-created expr object.

ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

Visits this node, the target, and each argument.

Visits this node, the target, and each argument. If there is a trailing initializer node, visits that last.

Method Details

GetInitializer() public method

Returns initializer object, if any.
Returns initializer object, if any.
public GetInitializer ( ) : ObjectLiteral
return ObjectLiteral

NewExpression() public method

public NewExpression ( ) : System.Text
return System.Text

NewExpression() public method

public NewExpression ( int pos ) : System.Text
pos int
return System.Text

NewExpression() public method

public NewExpression ( int pos, int len ) : System.Text
pos int
len int
return System.Text

SetInitializer() public method

Sets initializer object.
Sets initializer object. Rhino supports an experimental syntax of the form new expr [ ( arglist ) ] [initializer] , in which initializer is an object literal that is used to set additional properties on the newly-created expr object.
public SetInitializer ( ObjectLiteral initializer ) : void
initializer ObjectLiteral /// extra initializer object. /// Can be /// null /// . ///
return void

ToSource() public method

public ToSource ( int depth ) : string
depth int
return string

Visit() public method

Visits this node, the target, and each argument.
Visits this node, the target, and each argument. If there is a trailing initializer node, visits that last.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void