AjTalk.Compiler.Lexer.NextOperator C# (CSharp) Method

NextOperator() private method

private NextOperator ( char firstchar ) : Token
firstchar char
return Token
        private Token NextOperator(char firstchar)
        {
            string value = new string(firstchar, 1);

            if (firstchar != '^')
            {
                int ch;

                ch = this.NextChar();

                while (ch >= 0 && Operators.IndexOf((char)ch) >= 0)
                {
                    value += (char)ch;
                    ch = this.NextChar();
                }

                this.PushChar(ch);
            }

            Token token = new Token();
            token.Type = TokenType.Operator;
            token.Value = value;

            return token;
        }