C# Class Rhino.Ast.XmlElemRef

AST node for an E4X XML [expr] member-ref expression. The node type is Rhino.Token.REF_MEMBER .

Syntax:

 @opt ns:: opt [ expr ]
Examples include ns::[expr] , @ns::[expr] , @[expr] , *::[expr] and @*::[expr] .

Note that the form [expr] (i.e. no namespace or attribute-qualifier) is not a legal XmlElemRef expression, since it's already used for standard JavaScript ElementGet array-indexing. Hence, an XmlElemRef node always has either the attribute-qualifier, a non- null namespace node, or both.

The node starts at the @ token, if present. Otherwise it starts at the namespace name. The node bounds extend through the closing right-bracket, or if it is missing due to a syntax error, through the end of the index expression.

Inheritance: XmlRef
Afficher le fichier Open project: hazzik/Rhino.Net

Méthodes publiques

Méthode Description
GetExpression ( ) : AstNode

Returns index expression: the 'expr' in @[expr] or @*::[expr] .

GetLb ( ) : int

Returns left bracket position, or -1 if missing.

Returns left bracket position, or -1 if missing.

GetRb ( ) : int

Returns left bracket position, or -1 if missing.

Returns left bracket position, or -1 if missing.

SetBrackets ( int lb, int rb ) : void

Sets both bracket positions.

Sets both bracket positions.

SetExpression ( AstNode expr ) : void

Sets index expression, and sets its parent to this node.

Sets index expression, and sets its parent to this node.

SetLb ( int lb ) : void

Sets left bracket position, or -1 if missing.

Sets left bracket position, or -1 if missing.

SetRb ( int rb ) : void

Sets right bracket position, -1 if missing.

Sets right bracket position, -1 if missing.

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

Visits this node, then the namespace if provided, then the index expression.

Visits this node, then the namespace if provided, then the index expression.

XmlElemRef ( ) : System.Text
XmlElemRef ( int pos ) : System.Text
XmlElemRef ( int pos, int len ) : System.Text

Method Details

GetExpression() public méthode

Returns index expression: the 'expr' in @[expr] or @*::[expr] .
public GetExpression ( ) : AstNode
Résultat AstNode

GetLb() public méthode

Returns left bracket position, or -1 if missing.
Returns left bracket position, or -1 if missing.
public GetLb ( ) : int
Résultat int

GetRb() public méthode

Returns left bracket position, or -1 if missing.
Returns left bracket position, or -1 if missing.
public GetRb ( ) : int
Résultat int

SetBrackets() public méthode

Sets both bracket positions.
Sets both bracket positions.
public SetBrackets ( int lb, int rb ) : void
lb int
rb int
Résultat void

SetExpression() public méthode

Sets index expression, and sets its parent to this node.
Sets index expression, and sets its parent to this node.
/// if /// expr /// is /// null ///
public SetExpression ( AstNode expr ) : void
expr AstNode
Résultat void

SetLb() public méthode

Sets left bracket position, or -1 if missing.
Sets left bracket position, or -1 if missing.
public SetLb ( int lb ) : void
lb int
Résultat void

SetRb() public méthode

Sets right bracket position, -1 if missing.
Sets right bracket position, -1 if missing.
public SetRb ( int rb ) : void
rb int
Résultat void

ToSource() public méthode

public ToSource ( int depth ) : string
depth int
Résultat string

Visit() public méthode

Visits this node, then the namespace if provided, then the index expression.
Visits this node, then the namespace if provided, then the index expression.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Résultat void

XmlElemRef() public méthode

public XmlElemRef ( ) : System.Text
Résultat System.Text

XmlElemRef() public méthode

public XmlElemRef ( int pos ) : System.Text
pos int
Résultat System.Text

XmlElemRef() public méthode

public XmlElemRef ( int pos, int len ) : System.Text
pos int
len int
Résultat System.Text