C# Class SharpTAL.CodeGenerator

Inheritance: SharpTAL.TemplateProgram.AbstractProgramInterpreter, ICodeGenerator
Mostrar archivo Open project: lck/SharpTAL

Protected Properties

Property Type Description
FileBodyTemplate string

Public Methods

Method Description
CodeGenerator ( ) : System
GenerateCode ( TemplateInfo ti ) : string

Protected Methods

Method Description
FormatCSharpExpression ( string expression ) : string
FormatCSharpStatements ( string code ) : string
FormatCodeBlock ( CmdCodeBlock codeBlock ) : string
FormatExpression ( string expression ) : string
FormatStringExpression ( string expression ) : string
Handle_CMD_CODE_BLOCK ( ICommand command ) : void
Handle_CMD_ENDTAG_ENDSCOPE ( ICommand command ) : void
Handle_CMD_OUTPUT ( ICommand command ) : void
Handle_CMD_START_SCOPE ( ICommand command ) : void
Handle_CMD_START_TAG ( ICommand command ) : void
Handle_METAL_DEFINE_MACRO ( ICommand command ) : void
Handle_METAL_DEFINE_PARAM ( ICommand command ) : void
Handle_METAL_DEFINE_SLOT ( ICommand command ) : void
Handle_METAL_FILL_PARAM ( ICommand command ) : void
Handle_METAL_FILL_SLOT ( ICommand command ) : void
Handle_METAL_IMPORT ( ICommand command ) : void
Handle_METAL_USE_MACRO ( ICommand command ) : void
Handle_META_INTERPOLATION ( ICommand command ) : void
Handle_TAL_ATTRIBUTES ( ICommand command ) : void
Handle_TAL_CONDITION ( ICommand command ) : void
Handle_TAL_CONTENT ( ICommand command ) : void
Handle_TAL_DEFINE ( ICommand command ) : void
Handle_TAL_OMITTAG ( ICommand command ) : void
Handle_TAL_REPEAT ( ICommand command ) : void
Handle_TAL_REPLACE ( ICommand command ) : void
WriteToBody ( string format ) : void
WriteToBodyNoFormat ( string text ) : void
WriteToGlobals ( string format ) : void

Private Methods

Method Description
ProcessProgramMacros ( Program templateProgram, string programNamespace, List programNamespaces ) : void
SafeVariableName ( string str ) : string
WriteCmdInfo ( ICommand command ) : void

Method Details

CodeGenerator() public method

public CodeGenerator ( ) : System
return System

FormatCSharpExpression() protected method

protected FormatCSharpExpression ( string expression ) : string
expression string
return string

FormatCSharpStatements() protected method

protected FormatCSharpStatements ( string code ) : string
code string
return string

FormatCodeBlock() protected method

protected FormatCodeBlock ( CmdCodeBlock codeBlock ) : string
codeBlock SharpTAL.TemplateProgram.Commands.CmdCodeBlock
return string

FormatExpression() protected method

protected FormatExpression ( string expression ) : string
expression string
return string

FormatStringExpression() protected method

protected FormatStringExpression ( string expression ) : string
expression string
return string

GenerateCode() public method

public GenerateCode ( TemplateInfo ti ) : string
ti TemplateInfo
return string

Handle_CMD_CODE_BLOCK() protected method

protected Handle_CMD_CODE_BLOCK ( ICommand command ) : void
command ICommand
return void

Handle_CMD_ENDTAG_ENDSCOPE() protected method

protected Handle_CMD_ENDTAG_ENDSCOPE ( ICommand command ) : void
command ICommand
return void

Handle_CMD_OUTPUT() protected method

protected Handle_CMD_OUTPUT ( ICommand command ) : void
command ICommand
return void

Handle_CMD_START_SCOPE() protected method

protected Handle_CMD_START_SCOPE ( ICommand command ) : void
command ICommand
return void

Handle_CMD_START_TAG() protected method

protected Handle_CMD_START_TAG ( ICommand command ) : void
command ICommand
return void

Handle_METAL_DEFINE_MACRO() protected method

protected Handle_METAL_DEFINE_MACRO ( ICommand command ) : void
command ICommand
return void

Handle_METAL_DEFINE_PARAM() protected method

protected Handle_METAL_DEFINE_PARAM ( ICommand command ) : void
command ICommand
return void

Handle_METAL_DEFINE_SLOT() protected method

protected Handle_METAL_DEFINE_SLOT ( ICommand command ) : void
command ICommand
return void

Handle_METAL_FILL_PARAM() protected method

protected Handle_METAL_FILL_PARAM ( ICommand command ) : void
command ICommand
return void

Handle_METAL_FILL_SLOT() protected method

protected Handle_METAL_FILL_SLOT ( ICommand command ) : void
command ICommand
return void

Handle_METAL_IMPORT() protected method

protected Handle_METAL_IMPORT ( ICommand command ) : void
command ICommand
return void

Handle_METAL_USE_MACRO() protected method

protected Handle_METAL_USE_MACRO ( ICommand command ) : void
command ICommand
return void

Handle_META_INTERPOLATION() protected method

protected Handle_META_INTERPOLATION ( ICommand command ) : void
command ICommand
return void

Handle_TAL_ATTRIBUTES() protected method

protected Handle_TAL_ATTRIBUTES ( ICommand command ) : void
command ICommand
return void

Handle_TAL_CONDITION() protected method

protected Handle_TAL_CONDITION ( ICommand command ) : void
command ICommand
return void

Handle_TAL_CONTENT() protected method

protected Handle_TAL_CONTENT ( ICommand command ) : void
command ICommand
return void

Handle_TAL_DEFINE() protected method

protected Handle_TAL_DEFINE ( ICommand command ) : void
command ICommand
return void

Handle_TAL_OMITTAG() protected method

protected Handle_TAL_OMITTAG ( ICommand command ) : void
command ICommand
return void

Handle_TAL_REPEAT() protected method

protected Handle_TAL_REPEAT ( ICommand command ) : void
command ICommand
return void

Handle_TAL_REPLACE() protected method

protected Handle_TAL_REPLACE ( ICommand command ) : void
command ICommand
return void

WriteToBody() protected method

protected WriteToBody ( string format ) : void
format string
return void

WriteToBodyNoFormat() protected method

protected WriteToBodyNoFormat ( string text ) : void
text string
return void

WriteToGlobals() protected method

protected WriteToGlobals ( string format ) : void
format string
return void

Property Details

FileBodyTemplate protected_oe static_oe property

protected static string FileBodyTemplate
return string