C# Class mustache.FormatCompiler

Parses a format string and returns a text generator.
Show file Open project: Zocdoc/mustache-sharp

Public Methods

Method Description
Compile ( string format ) : Generator

Builds a text generator based on the given format.

FormatCompiler ( ) : System

Initializes a new instance of a FormatCompiler.

RegisterTag ( TagDefinition definition, bool isTopLevel ) : void

Registers the given tag definition with the parser.

Private Methods

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

Method Details

Compile() public method

Builds a text generator based on the given format.
public Compile ( string format ) : Generator
format string The format to parse.
return 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 ( TagDefinition definition, bool isTopLevel ) : void
definition TagDefinition The tag definition to register.
isTopLevel bool Specifies whether the tag is immediately in scope.
return void