C# Class Rosetta.AST.ProgramASTWalker

Walks a program AST node.
Inheritance: ASTWalker, IASTWalker
Afficher le fichier Open project: andry-tino/Rosetta Class Usage Examples

Protected Properties

Свойство Type Description
program Rosetta.Translation.ProgramTranslationUnit

Méthodes publiques

Méthode Description
Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : ProgramASTWalker

Factory method for class ProgramASTWalker.

ProgramASTWalker ( ProgramASTWalker other ) : System

Copy initializes a new instance of the ProgramASTWalker class.

For testability.

VisitClassDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax node ) : void

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.

VisitInterfaceDeclaration ( InterfaceDeclarationSyntax node ) : void

VisitNamespaceDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax node ) : void

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.

Walk ( ) : ITranslationUnit

Walk the whole tree starting from specified CSharpSyntaxNode and build the translation unit tree necessary for generating TypeScript output.

Méthodes protégées

Méthode Description
InvokeClassDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeEnumDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeInterfaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeNamespaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
ProgramASTWalker ( CSharpSyntaxNode node, ProgramTranslationUnit program, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System

Initializes a new instance of the ProgramASTWalker class.

Private Methods

Méthode Description
CreateWalkingContext ( ) : ASTWalkerContext

Method Details

Create() public static méthode

Factory method for class ProgramASTWalker.
public static Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : ProgramASTWalker
node CSharpSyntaxNode Used to initialize the walker.
context ASTWalkerContext The walking context.
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
Résultat ProgramASTWalker

InvokeClassDeclarationVisited() protected méthode

protected InvokeClassDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Résultat void

InvokeEnumDeclarationVisited() protected méthode

protected InvokeEnumDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Résultat void

InvokeInterfaceDeclarationVisited() protected méthode

protected InvokeInterfaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Résultat void

InvokeNamespaceDeclarationVisited() protected méthode

protected InvokeNamespaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Résultat void

ProgramASTWalker() protected méthode

Initializes a new instance of the ProgramASTWalker class.
protected ProgramASTWalker ( CSharpSyntaxNode node, ProgramTranslationUnit program, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System
node CSharpSyntaxNode
program Rosetta.Translation.ProgramTranslationUnit
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
Résultat System

ProgramASTWalker() public méthode

Copy initializes a new instance of the ProgramASTWalker class.
For testability.
public ProgramASTWalker ( ProgramASTWalker other ) : System
other ProgramASTWalker
Résultat System

VisitClassDeclaration() public méthode

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.
public VisitClassDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax
Résultat void

VisitInterfaceDeclaration() public méthode

public VisitInterfaceDeclaration ( InterfaceDeclarationSyntax node ) : void
node InterfaceDeclarationSyntax
Résultat void

VisitNamespaceDeclaration() public méthode

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.
public VisitNamespaceDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax
Résultat void

Walk() public méthode

Walk the whole tree starting from specified CSharpSyntaxNode and build the translation unit tree necessary for generating TypeScript output.
public Walk ( ) : ITranslationUnit
Résultat ITranslationUnit

Property Details

program protected_oe property

protected ProgramTranslationUnit,Rosetta.Translation program
Résultat Rosetta.Translation.ProgramTranslationUnit