﻿using RegexToolkit.Input;

namespace RegexToolkit
{
    public class Any<T> : Regex<T>
    {
        public static readonly Any<T> Instance = new Any<T>();

        private Any()
        { }

        public override bool IsMatch<TState>(IRegexInput<T, TState> sequence)
        {
            return sequence.MoveNext();
        }

        public override Regex<T> Reversed()
        {
            return this;
        }

        public override FixedMatches<T> MustMatch()
        {
            return FixedMatches<T>.DoesntHaveToMatch;
        }
    }
}