Skip to content

Commit 3b7d8bc

Browse files
vkutuevbachish
authored andcommitted
Add Regexp-Regexp Concat operator for Grammar DSL
1 parent e9c92ba commit 3b7d8bc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

solver/src/main/kotlin/org/ucfs/grammar/combinator/extension/StringExtension.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ object StringExtension {
1212
.fold(initial) { acc: Regexp, i: Term<String> -> Alternative.makeAlternative(acc, i) }
1313
}
1414
infix operator fun Regexp.times(other: String): Concat = Concat(head = this, Term(other))
15+
infix operator fun Regexp.times(other: Regexp): Concat = Concat(head = this, other)
1516
infix operator fun String.times(other: String): Concat = Concat(head = Term(this), Term(other))
1617
infix operator fun String.times(other: Regexp): Concat = Concat(head = Term(this), other)
1718

0 commit comments

Comments
 (0)