C# Class Microsoft.Scripting.Runtime.TokenizerBuffer

Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
Back ( ) : void
DiscardToken ( ) : void

Marks token start. It means the buffer can drop the current token. Can be called even if no token has been read yet.

GetChar ( int offset ) : char
GetCharRelative ( int disp ) : char
GetTokenSubstring ( int offset ) : string
GetTokenSubstring ( int offset, int length ) : string
Initialize ( TextReader reader, SourceLocation initialLocation, int initialCapacity, bool multiEolns ) : void
IsEoln ( int current ) : bool
MarkMultiLineTokenEnd ( ) : void

Marks token end. Enables to read the current token.

MarkMultiLineTokenEnd ( int disp ) : void
MarkSingleLineTokenEnd ( ) : void
MarkSingleLineTokenEnd ( int disp ) : void
MarkTokenEnd ( bool isMultiLine ) : void
Peek ( ) : int
Read ( int ch ) : bool
Read ( string str ) : bool
Read ( ) : int
ReadEolnOpt ( int current ) : int
ReadLine ( ) : int

Reads till the end of line and returns the character that stopped the reading. The returned character is not skipped.

Seek ( int offset ) : void

Sets the current position inside current token or one character behind it.

SeekRelative ( int disp ) : void

Sets the current position inside current token or one character behind it. A relative displacement with respect to the current position in the token is specified.

TokenizerBuffer ( TextReader reader, SourceLocation initialLocation, int initialCapacity, bool multiEolns ) : System

Private Methods

Méthode Description
CheckInvariants ( ) : void
ClearInvalidChars ( ) : void
DumpToken ( ) : void
GetTokenEndMultiEolns ( ) : SourceLocation
GetTokenEndSingleEoln ( ) : SourceLocation
GetTokenString ( ) : string
RefillBuffer ( ) : void
ResizeInternal ( char &array, int newSize, int start, int count ) : void

Resizes an array to a speficied new size and copies a portion of the original array into its beginning.

Method Details

Back() public méthode

public Back ( ) : void
Résultat void

DiscardToken() public méthode

Marks token start. It means the buffer can drop the current token. Can be called even if no token has been read yet.
public DiscardToken ( ) : void
Résultat void

GetChar() public méthode

public GetChar ( int offset ) : char
offset int
Résultat char

GetCharRelative() public méthode

public GetCharRelative ( int disp ) : char
disp int
Résultat char

GetTokenSubstring() public méthode

public GetTokenSubstring ( int offset ) : string
offset int
Résultat string

GetTokenSubstring() public méthode

public GetTokenSubstring ( int offset, int length ) : string
offset int
length int
Résultat string

Initialize() public méthode

public Initialize ( TextReader reader, SourceLocation initialLocation, int initialCapacity, bool multiEolns ) : void
reader System.IO.TextReader
initialLocation SourceLocation
initialCapacity int
multiEolns bool
Résultat void

IsEoln() public méthode

public IsEoln ( int current ) : bool
current int
Résultat bool

MarkMultiLineTokenEnd() public méthode

Marks token end. Enables to read the current token.
public MarkMultiLineTokenEnd ( ) : void
Résultat void

MarkMultiLineTokenEnd() public méthode

public MarkMultiLineTokenEnd ( int disp ) : void
disp int
Résultat void

MarkSingleLineTokenEnd() public méthode

public MarkSingleLineTokenEnd ( ) : void
Résultat void

MarkSingleLineTokenEnd() public méthode

public MarkSingleLineTokenEnd ( int disp ) : void
disp int
Résultat void

MarkTokenEnd() public méthode

public MarkTokenEnd ( bool isMultiLine ) : void
isMultiLine bool
Résultat void

Peek() public méthode

public Peek ( ) : int
Résultat int

Read() public méthode

public Read ( int ch ) : bool
ch int
Résultat bool

Read() public méthode

public Read ( string str ) : bool
str string
Résultat bool

Read() public méthode

public Read ( ) : int
Résultat int

ReadEolnOpt() public méthode

public ReadEolnOpt ( int current ) : int
current int
Résultat int

ReadLine() public méthode

Reads till the end of line and returns the character that stopped the reading. The returned character is not skipped.
public ReadLine ( ) : int
Résultat int

Seek() public méthode

Sets the current position inside current token or one character behind it.
public Seek ( int offset ) : void
offset int
Résultat void

SeekRelative() public méthode

Sets the current position inside current token or one character behind it. A relative displacement with respect to the current position in the token is specified.
public SeekRelative ( int disp ) : void
disp int
Résultat void

TokenizerBuffer() public méthode

public TokenizerBuffer ( TextReader reader, SourceLocation initialLocation, int initialCapacity, bool multiEolns ) : System
reader TextReader
initialLocation SourceLocation
initialCapacity int
multiEolns bool
Résultat System