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
파일 보기 프로젝트 열기: hazzik/Rhino.Net

공개 메소드들

메소드 설명
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