C# Class Projbook.Extension.CSharpExtractor.CSharpSyntaxMatchingNode

Represents a syntax matching node. Thie node is used to build a Trie representing possible matching. Each node contians children and matching syntax nodes.
Afficher le fichier Open project: FransBouma/DocNet Class Usage Examples

Méthodes publiques

Méthode Description
AddSyntaxNode ( Microsoft.CodeAnalysis.SyntaxNode node ) : void

Adds a syntax node as matching node.

CopyTo ( CSharpSyntaxMatchingNode targetNode, string name ) : void

Copies to a given node.

EnsureNode ( string name ) : CSharpSyntaxMatchingNode

Lookup a node from children and return it. if the node doesn't exist, a new one will be created and added to the children.

Match ( string chunks ) : CSharpSyntaxMatchingNode

Finds a node from syntax chunk.

ToString ( ) : string

Overrides ToString to renger the internal Trie to a string.

Private Methods

Méthode Description
Write ( StringBuilder stringBuilder, string name, int level ) : void

Writes a node to a string builder and recurse to the children.

Method Details

AddSyntaxNode() public méthode

Adds a syntax node as matching node.
public AddSyntaxNode ( Microsoft.CodeAnalysis.SyntaxNode node ) : void
node Microsoft.CodeAnalysis.SyntaxNode
Résultat void

CopyTo() public méthode

Copies to a given node.
public CopyTo ( CSharpSyntaxMatchingNode targetNode, string name ) : void
targetNode CSharpSyntaxMatchingNode The node wherer to copy.
name string The node name.
Résultat void

EnsureNode() public méthode

Lookup a node from children and return it. if the node doesn't exist, a new one will be created and added to the children.
public EnsureNode ( string name ) : CSharpSyntaxMatchingNode
name string The node name.
Résultat CSharpSyntaxMatchingNode

Match() public méthode

Finds a node from syntax chunk.
public Match ( string chunks ) : CSharpSyntaxMatchingNode
chunks string The chunks to match.
Résultat CSharpSyntaxMatchingNode

ToString() public méthode

Overrides ToString to renger the internal Trie to a string.
public ToString ( ) : string
Résultat string