Esempio n. 1
0
 public static Pattern Then([DisallowNull] this String @char, [AllowNull] Pattern other) => new MemoryLiteral(@char).Then(other);
Esempio n. 2
0
 public static Pattern Then(this Char @char, [AllowNull] Pattern other) => new CharLiteral(@char).Then(other);
Esempio n. 3
0
 public static Pattern Then(this Rune rune, [AllowNull] Pattern other) => new RuneLiteral(rune).Then(other);
Esempio n. 4
0
 /// <summary>
 /// Concatenates the patterns so that this <see cref="Rune"/> comes before <paramref name="other"/>
 /// </summary>
 /// <param name="other">The succeeding <see cref="Pattern"/></param>
 /// <returns>A new <see cref="Pattern"/> concatenating this <see cref="Rune"/> and <paramref name="other"/></returns>
 public static Pattern Then(this Rune @Rune, Pattern other)
 {
     Guard.NotNull(other, nameof(other));
     return(new RuneLiteral(@Rune).Concatenate(other));
 }
Esempio n. 5
0
 public static Pattern Many([AllowNull] Pattern pattern) => pattern?.Many();
Esempio n. 6
0
 public static Pattern To(this String @string, [DisallowNull] Pattern to, [AllowNull] Pattern escape) => escape is not null ? new EscapedRanger(@string, to, escape) : new Ranger(@string, to);
Esempio n. 7
0
 /// <summary>
 /// Initialize a new <see cref="KleenesClosure"/> from the given <paramref name="pattern"/>.
 /// </summary>
 /// <param name="pattern">The <see cref="Patterns.Pattern"/> to be parsed.</param>
 internal KleenesClosure([DisallowNull] Pattern pattern) => Pattern = pattern;
Esempio n. 8
0
 public static Pattern To(this String @string, [DisallowNull] Pattern to) => new Ranger(@string, to);
Esempio n. 9
0
 public static Pattern ToNested(this Rune rune, [DisallowNull] Pattern to) => new NestedRanger(rune, to);
Esempio n. 10
0
 public static Pattern To(this Rune rune, [DisallowNull] Pattern to, [AllowNull] Pattern escape) => escape is not null ? new EscapedRanger(rune, to, escape) : new Ranger(rune, to);
Esempio n. 11
0
 public static Pattern ToNested(this Char @char, [DisallowNull] Pattern to) => new NestedRanger(@char, to);
Esempio n. 12
0
 public static Pattern To(this Char @char, [DisallowNull] Pattern to, [AllowNull] Pattern escape) => escape is not null ? new EscapedRanger(@char, to, escape) : new Ranger(@char, to);