Ejemplo n.º 1
0
        public override bool Create(CharacterClassBuilder builder,
                                    out IMatch?match)
        {
            var result = expr.Create(builder, out match);

            if (result)
            {
                match = match !.Invert();
            }
            return(result);
        }
Ejemplo n.º 2
0
        public sealed override bool Create(CharacterClassBuilder builder,
                                           out IMatch?match)
        {
            var result = left.Create(builder, out var leftMatch);

            if (result)
            {
                result = right.Create(builder, out var rightMatch);
                match  = result ? Create(leftMatch !, rightMatch !) : null;
            }
            else
            {
                match = null;
            }
            return(result);
        }