C# Class Mustache.FormatCompiler

Parses a format string and returns a text generator.
显示文件 Open project: jehugaleahsa/mustache-sharp Class Usage Examples

Public Methods

Method Description
Compile ( string format ) : Mustache.Generator

Builds a text generator based on the given format.

FormatCompiler ( ) : System

Initializes a new instance of a FormatCompiler.

RegisterTag ( Mustache.TagDefinition definition, bool isTopLevel ) : void

Registers the given tag definition with the parser.

Private Methods

Method Description
buildCompoundGenerator ( Mustache.TagDefinition tagDefinition, List context, Mustache.CompoundGenerator generator, string format, int formatIndex ) : int
findNextTag ( Mustache.TagDefinition definition, string format, int formatIndex ) : Match
getArguments ( Mustache.TagDefinition definition, Match match, List context ) : ArgumentCollection
getClosingTagRegex ( string tagName ) : string
getCommentTagRegex ( ) : string
getKeyRegex ( ) : string
getTagRegex ( Mustache.TagDefinition definition ) : string
getUnknownTagRegex ( ) : string
prepareRegex ( Mustache.TagDefinition definition ) : Regex

Method Details

Compile() public method

Builds a text generator based on the given format.
public Compile ( string format ) : Mustache.Generator
format string The format to parse.
return Mustache.Generator

FormatCompiler() public method

Initializes a new instance of a FormatCompiler.
public FormatCompiler ( ) : System
return System

RegisterTag() public method

Registers the given tag definition with the parser.
public RegisterTag ( Mustache.TagDefinition definition, bool isTopLevel ) : void
definition Mustache.TagDefinition The tag definition to register.
isTopLevel bool Specifies whether the tag is immediately in scope.
return void