AjRools.Expert.Compiler.Lexer.NextOperator C# (CSharp) Method

NextOperator() private method

private NextOperator ( char ch ) : Token
ch char
return Token
        private Token NextOperator(char ch)
        {
            // TODO improve/fix algorithm, multicharacter operators
            string value = ch.ToString();
            int ich = this.NextChar();

            if (ich != -1)
            {
                string value2 = value + (char)ich;

                if (operators.Contains(value2))
                    return new Token(value2, TokenType.Operator);

                this.PushChar(ich);
            }

            return new Token(value, TokenType.Operator);
        }