C# Class CodeBox.CodeLexer.TokenList

Mostra file Open project: anaimi/codebox Class Usage Examples

Public Methods

Method Description
Add ( int index, TokenType type, string value ) : void
Backtrack ( ) : void
Consume ( ) : void
ConsumeBlockBackward ( ) : void
ConsumeBlockForward ( ) : void
CurrentIndex ( ) : int
GotoToken ( Token token ) : void
HasNext ( ) : bool
HasPrevious ( ) : bool
Next ( ) : Token
Next ( int ahead ) : Token
Previous ( ) : Token
TokenList ( ) : System
TokenList ( TokenList outerTokens, int fromToken, int toToken ) : System

Creates a new token list by cloning outerTokens with a specified range (range is exclusive, not inclusive)

TokenList ( string code, IEnumerable keywords ) : System
TokenList ( string code, IEnumerable keywords, int startLine, int startPosition ) : System

Private Methods

Method Description
EatWhitespace ( string code, Position position ) : void
GenerateList ( string code, int startLine, int startPosition ) : void
IsKeyword ( string identifier ) : bool
ParseComments ( string code, Position position, bool recurse ) : int
ParseNumricConstant ( string code, Position position, List indices ) : string
ParseStringConstant ( string code, Position position, List indices ) : string

Method Details

Add() public method

public Add ( int index, TokenType type, string value ) : void
index int
type TokenType
value string
return void

Backtrack() public method

public Backtrack ( ) : void
return void

Consume() public method

public Consume ( ) : void
return void

ConsumeBlockBackward() public method

public ConsumeBlockBackward ( ) : void
return void

ConsumeBlockForward() public method

public ConsumeBlockForward ( ) : void
return void

CurrentIndex() public method

public CurrentIndex ( ) : int
return int

GotoToken() public method

public GotoToken ( Token token ) : void
token Token
return void

HasNext() public method

public HasNext ( ) : bool
return bool

HasPrevious() public method

public HasPrevious ( ) : bool
return bool

Next() public method

public Next ( ) : Token
return Token

Next() public method

public Next ( int ahead ) : Token
ahead int
return Token

Previous() public method

public Previous ( ) : Token
return Token

TokenList() public method

public TokenList ( ) : System
return System

TokenList() public method

Creates a new token list by cloning outerTokens with a specified range (range is exclusive, not inclusive)
public TokenList ( TokenList outerTokens, int fromToken, int toToken ) : System
outerTokens TokenList
fromToken int
toToken int
return System

TokenList() public method

public TokenList ( string code, IEnumerable keywords ) : System
code string
keywords IEnumerable
return System

TokenList() public method

public TokenList ( string code, IEnumerable keywords, int startLine, int startPosition ) : System
code string
keywords IEnumerable
startLine int
startPosition int
return System