C# Class Microsoft.Scripting.Hosting.TokenCategorizer

Inheritance: System.Object
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
Initialize ( object state, ScriptSource scriptSource, SourceLocation initialLocation ) : void
InitializeLifetimeService ( ) : object
ReadToken ( ) : TokenInfo

Move the tokenizer past the next token and return its category.

ReadTokens ( int characterCount ) : IEnumerable

Get all tokens over a block of the stream.

The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token should be returned.

SkipToken ( ) : bool

Move the tokenizer past the next token.

SkipTokens ( int characterCount ) : bool

Scan from startLocation to at least startLocation + length.

This method is used to determine state at arbitrary startLocation.

Private Methods

Méthode Description
TokenCategorizer ( Microsoft.Scripting.Runtime.TokenizerService tokenizer ) : System

Method Details

Initialize() public méthode

public Initialize ( object state, ScriptSource scriptSource, SourceLocation initialLocation ) : void
state object
scriptSource ScriptSource
initialLocation SourceLocation
Résultat void

InitializeLifetimeService() public méthode

public InitializeLifetimeService ( ) : object
Résultat object

ReadToken() public méthode

Move the tokenizer past the next token and return its category.
public ReadToken ( ) : TokenInfo
Résultat TokenInfo

ReadTokens() public méthode

Get all tokens over a block of the stream.

The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token should be returned.

public ReadTokens ( int characterCount ) : IEnumerable
characterCount int Tokens are read until at least given amount of characters is read or the stream ends.
Résultat IEnumerable

SkipToken() public méthode

Move the tokenizer past the next token.
public SkipToken ( ) : bool
Résultat bool

SkipTokens() public méthode

Scan from startLocation to at least startLocation + length.
This method is used to determine state at arbitrary startLocation.
public SkipTokens ( int characterCount ) : bool
characterCount int Tokens are read until at least given amount of characters is read or the stream ends.
Résultat bool