C# Class Rosetta.AST.BlockASTWalker

Walks a block AST node. TODO: Attention, MethodASTWalker has great part of the logic is in common.
Inheritance: ASTWalker, IASTWalker
Mostrar archivo Open project: andry-tino/Rosetta Class Usage Examples

Protected Properties

Property Type Description
statementsGroup Rosetta.Translation.StatementsGroupTranslationUnit

Public Methods

Method Description
BlockASTWalker ( BlockASTWalker other ) : System

Copy initializes a new instance of the BlockASTWalker class.

Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : BlockASTWalker

Factory method for class BlockASTWalker.

VisitBreakStatement ( BreakStatementSyntax node ) : void

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

VisitCheckedStatement ( CheckedStatementSyntax node ) : void

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

VisitContinueStatement ( ContinueStatementSyntax node ) : void

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

VisitDoStatement ( DoStatementSyntax node ) : void

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

VisitEmptyStatement ( EmptyStatementSyntax node ) : void

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

VisitFixedStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.FixedStatementSyntax node ) : void

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

VisitForEachStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ForEachStatementSyntax node ) : void

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

VisitForStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax node ) : void

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

VisitGotoStatement ( GotoStatementSyntax node ) : void

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

VisitIfStatement ( IfStatementSyntax node ) : void

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

VisitLabeledStatement ( LabeledStatementSyntax node ) : void

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

VisitLocalDeclarationStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax node ) : void

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

VisitLockStatement ( LockStatementSyntax node ) : void

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

VisitReturnStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ReturnStatementSyntax node ) : void

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

VisitSwitchStatement ( SwitchStatementSyntax node ) : void

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

VisitThrowStatement ( ThrowStatementSyntax node ) : void

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

VisitTryStatement ( TryStatementSyntax node ) : void

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

VisitUnsafeStatement ( UnsafeStatementSyntax node ) : void

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

VisitUsingStatement ( UsingStatementSyntax node ) : void

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

VisitWhileStatement ( WhileStatementSyntax node ) : void

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

VisitYieldStatement ( YieldStatementSyntax node ) : void

Statements 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.

Protected Methods

Method Description
BlockASTWalker ( CSharpSyntaxNode node, StatementsGroupTranslationUnit statementsGroup, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System

Initializes a new instance of the BlockASTWalker class.

Private Methods

Method Description
InvokeStatementVisited ( object sender, WalkerEventArgs e ) : void
VisitStatement ( StatementSyntax node ) : void

Method Details

BlockASTWalker() public method

Copy initializes a new instance of the BlockASTWalker class.
public BlockASTWalker ( BlockASTWalker other ) : System
other BlockASTWalker
return System

BlockASTWalker() protected method

Initializes a new instance of the BlockASTWalker class.
protected BlockASTWalker ( CSharpSyntaxNode node, StatementsGroupTranslationUnit statementsGroup, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System
node CSharpSyntaxNode
statementsGroup Rosetta.Translation.StatementsGroupTranslationUnit
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
return System

Create() public static method

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

VisitBreakStatement() public method

Statements 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 VisitBreakStatement ( BreakStatementSyntax node ) : void
node BreakStatementSyntax
return void

VisitCheckedStatement() public method

Statements 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 VisitCheckedStatement ( CheckedStatementSyntax node ) : void
node CheckedStatementSyntax
return void

VisitContinueStatement() public method

Statements 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 VisitContinueStatement ( ContinueStatementSyntax node ) : void
node ContinueStatementSyntax
return void

VisitDoStatement() public method

Statements 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 VisitDoStatement ( DoStatementSyntax node ) : void
node DoStatementSyntax
return void

VisitEmptyStatement() public method

Statements 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 VisitEmptyStatement ( EmptyStatementSyntax node ) : void
node EmptyStatementSyntax
return void

VisitFixedStatement() public method

Statements 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 VisitFixedStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.FixedStatementSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.FixedStatementSyntax
return void

VisitForEachStatement() public method

Statements 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 VisitForEachStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ForEachStatementSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.ForEachStatementSyntax
return void

VisitForStatement() public method

Statements 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 VisitForStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
return void

VisitGotoStatement() public method

Statements 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 VisitGotoStatement ( GotoStatementSyntax node ) : void
node GotoStatementSyntax
return void

VisitIfStatement() public method

Statements 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 VisitIfStatement ( IfStatementSyntax node ) : void
node IfStatementSyntax
return void

VisitLabeledStatement() public method

Statements 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 VisitLabeledStatement ( LabeledStatementSyntax node ) : void
node LabeledStatementSyntax
return void

VisitLocalDeclarationStatement() public method

Statements 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 VisitLocalDeclarationStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax
return void

VisitLockStatement() public method

Statements 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 VisitLockStatement ( LockStatementSyntax node ) : void
node LockStatementSyntax
return void

VisitReturnStatement() public method

Statements 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 VisitReturnStatement ( Microsoft.CodeAnalysis.CSharp.Syntax.ReturnStatementSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.ReturnStatementSyntax
return void

VisitSwitchStatement() public method

Statements 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 VisitSwitchStatement ( SwitchStatementSyntax node ) : void
node SwitchStatementSyntax
return void

VisitThrowStatement() public method

Statements 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 VisitThrowStatement ( ThrowStatementSyntax node ) : void
node ThrowStatementSyntax
return void

VisitTryStatement() public method

Statements 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 VisitTryStatement ( TryStatementSyntax node ) : void
node TryStatementSyntax
return void

VisitUnsafeStatement() public method

Statements 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 VisitUnsafeStatement ( UnsafeStatementSyntax node ) : void
node UnsafeStatementSyntax
return void

VisitUsingStatement() public method

Statements 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 VisitUsingStatement ( UsingStatementSyntax node ) : void
node UsingStatementSyntax
return void

VisitWhileStatement() public method

Statements 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 VisitWhileStatement ( WhileStatementSyntax node ) : void
node WhileStatementSyntax
return void

VisitYieldStatement() public method

Statements 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 VisitYieldStatement ( YieldStatementSyntax node ) : void
node YieldStatementSyntax
return void

Walk() public method

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

Property Details

statementsGroup protected_oe property

protected StatementsGroupTranslationUnit,Rosetta.Translation statementsGroup
return Rosetta.Translation.StatementsGroupTranslationUnit