VBF.Compilers.Scanners.Lexeme.GetTokenIndex C# (CSharp) Method

GetTokenIndex() public method

public GetTokenIndex ( int lexerState ) : int
lexerState int
return 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);
        }

Usage Example

Esempio n. 1
0
File: Scanner.cs Progetto: zgf/VBF
        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));
        }
All Usage Examples Of VBF.Compilers.Scanners.Lexeme::GetTokenIndex