Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 public sealed override void LogMissing(CharacterClassBuilder builder)
 {
     left.LogMissing(builder);
     right.LogMissing(builder);
 }
Beispiel #4
0
 public override void LogMissing(CharacterClassBuilder builder) =>
 builder.LogMissing(name);
Beispiel #5
0
 public virtual void LogMissing(CharacterClassBuilder builder)
 {
 }
Beispiel #6
0
 public override bool Create(CharacterClassBuilder builder,
                             out IMatch?match) =>
 builder.TryFind(name, out match);
Beispiel #7
0
 public abstract bool Create(CharacterClassBuilder builder,
                             out IMatch?match);
Beispiel #8
0
 public override bool Create(CharacterClassBuilder builder,
                             out IMatch?match)
 {
     match = new SingleChar(ch);
     return(true);
 }
Beispiel #9
0
 public override bool Create(CharacterClassBuilder builder,
                             out IMatch?match)
 {
     match = charClass;
     return(true);
 }
Beispiel #10
0
 public override void LogMissing(CharacterClassBuilder builder) =>
 expr.LogMissing(builder);