C# Class Pytocs.Translate.MethodGenerator

Generates code for a Python function definition.
Afficher le fichier Open project: uxmal/pytocs Class Usage Examples

Protected Properties

Свойство Type Description
args List
f FunctionDef
fnName string
gen Pytocs.CodeModel.CodeGenerator
stmtXlat StatementTranslator
xlat ExpTranslator

Méthodes publiques

Méthode Description
Generate ( ) : CodeMemberMethod
MethodGenerator ( FunctionDef f, string fnName, List args, bool isStatic, CodeGenerator gen ) : System

Méthodes protégées

Méthode Description
Generate ( CodeParameterDeclarationExpression parms ) : CodeMemberMethod
GenerateDefaultArgMethod ( CodeParameterDeclarationExpression argList, CodeExpression paramList ) : void
GenerateTupleParameterUnpackers ( CodeMemberMethod method ) : void
Xlat ( SuiteStatement suite ) : void

Private Methods

Méthode Description
CreateFunctionParameters ( IEnumerable parameters ) : CodeParameterDeclarationExpression[]
GenerateDefaultArgMethod ( int iFirstDefault ) : void
GenerateFunctionParameter ( Parameter ta ) : CodeParameterDeclarationExpression
GenerateTupleParameterType ( List list ) : CodeTypeReference
GenerateTupleParameterUnpacker ( Parameter p, int i, CodeExpression tuplePath, CodeMemberMethod method ) : void

Method Details

Generate() public méthode

public Generate ( ) : CodeMemberMethod
Résultat CodeMemberMethod

Generate() protected méthode

protected Generate ( CodeParameterDeclarationExpression parms ) : CodeMemberMethod
parms CodeParameterDeclarationExpression
Résultat CodeMemberMethod

GenerateDefaultArgMethod() protected méthode

protected GenerateDefaultArgMethod ( CodeParameterDeclarationExpression argList, CodeExpression paramList ) : void
argList CodeParameterDeclarationExpression
paramList CodeExpression
Résultat void

GenerateTupleParameterUnpackers() protected méthode

protected GenerateTupleParameterUnpackers ( CodeMemberMethod method ) : void
method CodeMemberMethod
Résultat void

MethodGenerator() public méthode

public MethodGenerator ( FunctionDef f, string fnName, List args, bool isStatic, CodeGenerator gen ) : System
f FunctionDef
fnName string
args List
isStatic bool
gen Pytocs.CodeModel.CodeGenerator
Résultat System

Xlat() protected méthode

protected Xlat ( SuiteStatement suite ) : void
suite SuiteStatement
Résultat void

Property Details

args protected_oe property

protected List args
Résultat List

f protected_oe property

protected FunctionDef f
Résultat FunctionDef

fnName protected_oe property

protected string fnName
Résultat string

gen protected_oe property

protected CodeGenerator,Pytocs.CodeModel gen
Résultat Pytocs.CodeModel.CodeGenerator

stmtXlat protected_oe property

protected StatementTranslator,Pytocs.Translate stmtXlat
Résultat StatementTranslator

xlat protected_oe property

protected ExpTranslator xlat
Résultat ExpTranslator