C# Class Pytocs.Translate.StatementTranslator

Inheritance: IStatementVisitor
Exibir arquivo Open project: uxmal/pytocs Class Usage Examples

Public Methods

Method Description
ConvertFirstStringToComments ( List statements ) : IEnumerable
GenSymAutomatic ( string prefix, CodeTypeReference type, bool parameter ) : CodeVariableReferenceExpression
GenSymLocal ( string prefix, CodeTypeReference type ) : CodeVariableReferenceExpression
GenSymParameter ( string prefix, CodeTypeReference type ) : CodeVariableReferenceExpression
StatementTranslator ( CodeGenerator gen, LocalSymbol>.Dictionary autos ) : System
VisitAssert ( AssertStatement a ) : void
VisitBreak ( BreakStatement b ) : void
VisitClass ( ClassDef c ) : void
VisitComment ( CommentStatement c ) : void
VisitContinue ( ContinueStatement c ) : void
VisitDecorated ( Decorated d ) : void
VisitDecorator ( Decorator d ) : CodeAttributeDeclaration
VisitDel ( DelStatement d ) : void
VisitExec ( ExecStatement e ) : void
VisitExp ( ExpStatement e ) : void
VisitFor ( ForStatement f ) : void
VisitFrom ( FromStatement f ) : void
VisitFuncdef ( FunctionDef f ) : void
VisitGlobal ( GlobalStatement g ) : void
VisitIf ( IfStatement i ) : void
VisitImport ( ImportStatement i ) : void
VisitNonLocal ( NonlocalStatement n ) : void
VisitPass ( PassStatement p ) : void
VisitPrint ( PrintStatement p ) : void
VisitRaise ( RaiseStatement r ) : void
VisitReturn ( ReturnStatement r ) : void
VisitSuite ( SuiteStatement s ) : void
VisitTry ( TryStatement t ) : void
VisitWhile ( WhileStatement w ) : void
VisitWith ( WithStatement w ) : void
VisitYield ( YieldStatement y ) : void
Xlat ( Statement stmt ) : void

Protected Methods

Method Description
GenerateField ( string name, CodeExpression value ) : CodeMemberField

Private Methods

Method Description
ClassTranslator_GenerateField ( Identifier id, ExpTranslator xlat, AssignExp ass ) : void
EmitTupleAssignment ( List lhs, CodeExpression rhs ) : void
EmitTupleFieldAssignments ( List lhs, CodeVariableReferenceExpression tup ) : void
EmitTupleToTupleAssignment ( List dstTuple, List srcTuple ) : void
EnsureClassConstructor ( ) : CodeConstructor
EnsureLocalVariable ( string name, CodeTypeReference type, bool parameter ) : void
GenSymLocalTuple ( ) : CodeVariableReferenceExpression
GenerateAssert ( Exp test ) : void
GenerateBaseClassName ( Exp exp ) : string
GenerateClause ( ExceptHandler eh ) : CodeCatchClause
GenerateForTuple ( ForStatement f, List ids ) : void
Translate ( WithItem wi ) : CodeStatement

Method Details

ConvertFirstStringToComments() public static method

public static ConvertFirstStringToComments ( List statements ) : IEnumerable
statements List
return IEnumerable

GenSymAutomatic() public method

public GenSymAutomatic ( string prefix, CodeTypeReference type, bool parameter ) : CodeVariableReferenceExpression
prefix string
type CodeTypeReference
parameter bool
return CodeVariableReferenceExpression

GenSymLocal() public method

public GenSymLocal ( string prefix, CodeTypeReference type ) : CodeVariableReferenceExpression
prefix string
type CodeTypeReference
return CodeVariableReferenceExpression

GenSymParameter() public method

public GenSymParameter ( string prefix, CodeTypeReference type ) : CodeVariableReferenceExpression
prefix string
type CodeTypeReference
return CodeVariableReferenceExpression

GenerateField() protected method

protected GenerateField ( string name, CodeExpression value ) : CodeMemberField
name string
value CodeExpression
return CodeMemberField

StatementTranslator() public method

public StatementTranslator ( CodeGenerator gen, LocalSymbol>.Dictionary autos ) : System
gen Pytocs.CodeModel.CodeGenerator
autos LocalSymbol>.Dictionary
return System

VisitAssert() public method

public VisitAssert ( AssertStatement a ) : void
a AssertStatement
return void

VisitBreak() public method

public VisitBreak ( BreakStatement b ) : void
b BreakStatement
return void

VisitClass() public method

public VisitClass ( ClassDef c ) : void
c ClassDef
return void

VisitComment() public method

public VisitComment ( CommentStatement c ) : void
c CommentStatement
return void

VisitContinue() public method

public VisitContinue ( ContinueStatement c ) : void
c ContinueStatement
return void

VisitDecorated() public method

public VisitDecorated ( Decorated d ) : void
d Decorated
return void

VisitDecorator() public method

public VisitDecorator ( Decorator d ) : CodeAttributeDeclaration
d Pytocs.Syntax.Decorator
return Pytocs.CodeModel.CodeAttributeDeclaration

VisitDel() public method

public VisitDel ( DelStatement d ) : void
d DelStatement
return void

VisitExec() public method

public VisitExec ( ExecStatement e ) : void
e ExecStatement
return void

VisitExp() public method

public VisitExp ( ExpStatement e ) : void
e ExpStatement
return void

VisitFor() public method

public VisitFor ( ForStatement f ) : void
f ForStatement
return void

VisitFrom() public method

public VisitFrom ( FromStatement f ) : void
f FromStatement
return void

VisitFuncdef() public method

public VisitFuncdef ( FunctionDef f ) : void
f FunctionDef
return void

VisitGlobal() public method

public VisitGlobal ( GlobalStatement g ) : void
g GlobalStatement
return void

VisitIf() public method

public VisitIf ( IfStatement i ) : void
i IfStatement
return void

VisitImport() public method

public VisitImport ( ImportStatement i ) : void
i ImportStatement
return void

VisitNonLocal() public method

public VisitNonLocal ( NonlocalStatement n ) : void
n NonlocalStatement
return void

VisitPass() public method

public VisitPass ( PassStatement p ) : void
p PassStatement
return void

VisitPrint() public method

public VisitPrint ( PrintStatement p ) : void
p PrintStatement
return void

VisitRaise() public method

public VisitRaise ( RaiseStatement r ) : void
r RaiseStatement
return void

VisitReturn() public method

public VisitReturn ( ReturnStatement r ) : void
r ReturnStatement
return void

VisitSuite() public method

public VisitSuite ( SuiteStatement s ) : void
s SuiteStatement
return void

VisitTry() public method

public VisitTry ( TryStatement t ) : void
t TryStatement
return void

VisitWhile() public method

public VisitWhile ( WhileStatement w ) : void
w WhileStatement
return void

VisitWith() public method

public VisitWith ( WithStatement w ) : void
w WithStatement
return void

VisitYield() public method

public VisitYield ( YieldStatement y ) : void
y YieldStatement
return void

Xlat() public method

public Xlat ( Statement stmt ) : void
stmt Statement
return void