public GetTokenIndex ( int lexerState ) : int | ||
lexerState | int | |
Résultat | int |
public int GetTokenIndex(int lexerState)
{
if (m_scannerInfo == null)
{
throw new InvalidOperationException("This lexeme is not initialized");
}
return m_scannerInfo.GetTokenIndex(m_stateIndex, lexerState);
}
public int PeekInLexerState(int lexerStateIndex, int lookAhead) { CodeContract.RequiresArgumentInRange(lookAhead > 0, "lookAhead", "The lookAhead must be greater than zero"); CodeContract.RequiresArgumentInRange(lexerStateIndex >= 0 && lexerStateIndex < ScannerInfo.LexerStateCount, "lexerStateIndex", "Invalid lexer state index"); Lexeme lookAheadLexeme = PeekLexeme(lookAhead); return(lookAheadLexeme.GetTokenIndex(lexerStateIndex)); }