C# Class Stubble.Core.Scanner

Represents the Scanner which takes a template and split it using Regex into strings which can be parsed into Tokens
ファイルを表示 Open project: StubbleOrg/Stubble

Public Methods

Method Description
Scan ( Regex expression ) : string

Uses the expression to scan the tail of the template returning the match

Scan ( string expression ) : string

Parses the expression into a Regex and uses it to scan the tail of the template

ScanUntil ( Regex expression ) : string

Scans the template until the Regex match and returns the string until the match

ScanUntil ( string expression ) : string

Turns the expression into a Regex and scans the template until the Regex match and returns the string until the match

Scanner ( string template ) : System.Text.RegularExpressions

Initializes a new instance of the Scanner class.

Method Details

Scan() public method

Uses the expression to scan the tail of the template returning the match
public Scan ( Regex expression ) : string
expression System.Text.RegularExpressions.Regex The Regex expression to use on the tail
return string

Scan() public method

Parses the expression into a Regex and uses it to scan the tail of the template
public Scan ( string expression ) : string
expression string The Regex expression to use on the tail
return string

ScanUntil() public method

Scans the template until the Regex match and returns the string until the match
public ScanUntil ( Regex expression ) : string
expression System.Text.RegularExpressions.Regex The Regex to use for scanning until matched
return string

ScanUntil() public method

Turns the expression into a Regex and scans the template until the Regex match and returns the string until the match
public ScanUntil ( string expression ) : string
expression string The expression to turn into a Regex to use for scanning until matched
return string

Scanner() public method

Initializes a new instance of the Scanner class.
public Scanner ( string template ) : System.Text.RegularExpressions
template string The template to scan
return System.Text.RegularExpressions