C# 클래스 Rhino.Ast.AstRoot

Node for the root of a parse tree.
Node for the root of a parse tree. It contains the statements and functions in the script, and a list of Comment nodes associated with the script as a whole. Node type is Rhino.Token.SCRIPT .

Note that the tree itself does not store errors. To collect the parse errors and warnings, pass an Rhino.ErrorReporter to the Rhino.Parser via the Rhino.CompilerEnvirons .

상속: ScriptNode
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
AddComment ( Comment comment ) : void

Add a comment to the comment set.

Add a comment to the comment set.

AstRoot ( ) : System
AstRoot ( int pos ) : System
CheckParentLinks ( ) : void

Debugging function to check that the parser has set the parent link for every node in the tree.

Debugging function to check that the parser has set the parent link for every node in the tree.

DebugPrint ( ) : string

A debug-printer that includes comments (at the end).

A debug-printer that includes comments (at the end).

GetComments ( ) : ICollection

Returns comment set

IsInStrictMode ( ) : bool
SetComments ( ICollection comments ) : void

Sets comment list, and updates the parent of each entry to point to this node.

Sets comment list, and updates the parent of each entry to point to this node. Replaces any existing comments.

SetInStrictMode ( bool inStrictMode ) : void
ToSource ( int depth ) : string
VisitAll ( NodeVisitor visitor ) : void

Visits the AST nodes, then the comment nodes.

Visits the AST nodes, then the comment nodes. This method is equivalent to calling ScriptNode.Visit(NodeVisitor) , then VisitComments(NodeVisitor) . The return value is ignored while visiting comment nodes.

VisitComments ( NodeVisitor visitor ) : void

Visits the comment nodes in the order they appear in the source code.

Visits the comment nodes in the order they appear in the source code. The comments are not visited by the ScriptNode.Visit(NodeVisitor) function - you must use this function to visit them.

메소드 상세

AddComment() 공개 메소드

Add a comment to the comment set.
Add a comment to the comment set.
/// if comment is /// null ///
public AddComment ( Comment comment ) : void
comment Comment the comment node.
리턴 void

AstRoot() 공개 메소드

public AstRoot ( ) : System
리턴 System

AstRoot() 공개 메소드

public AstRoot ( int pos ) : System
pos int
리턴 System

CheckParentLinks() 공개 메소드

Debugging function to check that the parser has set the parent link for every node in the tree.
Debugging function to check that the parser has set the parent link for every node in the tree.
if a parent link is missing
public CheckParentLinks ( ) : void
리턴 void

DebugPrint() 공개 메소드

A debug-printer that includes comments (at the end).
A debug-printer that includes comments (at the end).
public DebugPrint ( ) : string
리턴 string

GetComments() 공개 메소드

Returns comment set
public GetComments ( ) : ICollection
리턴 ICollection

IsInStrictMode() 공개 메소드

public IsInStrictMode ( ) : bool
리턴 bool

SetComments() 공개 메소드

Sets comment list, and updates the parent of each entry to point to this node.
Sets comment list, and updates the parent of each entry to point to this node. Replaces any existing comments.
public SetComments ( ICollection comments ) : void
comments ICollection /// comment list. can be /// null /// . ///
리턴 void

SetInStrictMode() 공개 메소드

public SetInStrictMode ( bool inStrictMode ) : void
inStrictMode bool
리턴 void

ToSource() 공개 메소드

public ToSource ( int depth ) : string
depth int
리턴 string

VisitAll() 공개 메소드

Visits the AST nodes, then the comment nodes.
Visits the AST nodes, then the comment nodes. This method is equivalent to calling ScriptNode.Visit(NodeVisitor) , then VisitComments(NodeVisitor) . The return value is ignored while visiting comment nodes.
public VisitAll ( NodeVisitor visitor ) : void
visitor NodeVisitor the callback object.
리턴 void

VisitComments() 공개 메소드

Visits the comment nodes in the order they appear in the source code.
Visits the comment nodes in the order they appear in the source code. The comments are not visited by the ScriptNode.Visit(NodeVisitor) function - you must use this function to visit them.
public VisitComments ( NodeVisitor visitor ) : void
visitor NodeVisitor /// the callback object. It is passed each comment node. /// The return value is ignored. ///
리턴 void