C# Класс 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.

Наследование: XmlRef
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

GetExpression() публичный Метод

Returns index expression: the 'expr' in @[expr] or @*::[expr] .
public GetExpression ( ) : AstNode
Результат AstNode

GetLb() публичный Метод

Returns left bracket position, or -1 if missing.
Returns left bracket position, or -1 if missing.
public GetLb ( ) : int
Результат int

GetRb() публичный Метод

Returns left bracket position, or -1 if missing.
Returns left bracket position, or -1 if missing.
public GetRb ( ) : int
Результат int

SetBrackets() публичный Метод

Sets both bracket positions.
Sets both bracket positions.
public SetBrackets ( int lb, int rb ) : void
lb int
rb int
Результат void

SetExpression() публичный Метод

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
Результат void

SetLb() публичный Метод

Sets left bracket position, or -1 if missing.
Sets left bracket position, or -1 if missing.
public SetLb ( int lb ) : void
lb int
Результат void

SetRb() публичный Метод

Sets right bracket position, -1 if missing.
Sets right bracket position, -1 if missing.
public SetRb ( int rb ) : void
rb int
Результат void

ToSource() публичный Метод

public ToSource ( int depth ) : string
depth int
Результат string

Visit() публичный Метод

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
Результат void

XmlElemRef() публичный Метод

public XmlElemRef ( ) : System.Text
Результат System.Text

XmlElemRef() публичный Метод

public XmlElemRef ( int pos ) : System.Text
pos int
Результат System.Text

XmlElemRef() публичный Метод

public XmlElemRef ( int pos, int len ) : System.Text
pos int
len int
Результат System.Text