C# Класс 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.
Показать файл Открыть проект Примеры использования класса

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

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

Приватные методы

Метод Описание
Write ( StringBuilder stringBuilder, string name, int level ) : void

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

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

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

Adds a syntax node as matching node.
public AddSyntaxNode ( Microsoft.CodeAnalysis.SyntaxNode node ) : void
node Microsoft.CodeAnalysis.SyntaxNode
Результат void

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

Copies to a given node.
public CopyTo ( CSharpSyntaxMatchingNode targetNode, string name ) : void
targetNode CSharpSyntaxMatchingNode The node wherer to copy.
name string The node name.
Результат void

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

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

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

Finds a node from syntax chunk.
public Match ( string chunks ) : CSharpSyntaxMatchingNode
chunks string The chunks to match.
Результат CSharpSyntaxMatchingNode

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

Overrides ToString to renger the internal Trie to a string.
public ToString ( ) : string
Результат string