C# Class 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 .

Inheritance: ScriptNode
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AddComment() public méthode

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.
Résultat void

AstRoot() public méthode

public AstRoot ( ) : System
Résultat System

AstRoot() public méthode

public AstRoot ( int pos ) : System
pos int
Résultat System

CheckParentLinks() public méthode

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
Résultat void

DebugPrint() public méthode

A debug-printer that includes comments (at the end).
A debug-printer that includes comments (at the end).
public DebugPrint ( ) : string
Résultat string

GetComments() public méthode

Returns comment set
public GetComments ( ) : ICollection
Résultat ICollection

IsInStrictMode() public méthode

public IsInStrictMode ( ) : bool
Résultat bool

SetComments() public méthode

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 /// . ///
Résultat void

SetInStrictMode() public méthode

public SetInStrictMode ( bool inStrictMode ) : void
inStrictMode bool
Résultat void

ToSource() public méthode

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

VisitAll() public méthode

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.
Résultat void

VisitComments() public méthode

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. ///
Résultat void