Skip to content

Commit be0dc3f

Browse files
author
Hana Dusíková
committed
add first set calculation for lookbehind
1 parent 7d9bbcb commit be0dc3f

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

include/ctre/first.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@ constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_positive<Seq..
161161
return ctll::list<can_be_anything>{};
162162
}
163163

164+
// lookbehind_negative TODO fixme
165+
template <typename... Content, typename... Seq, typename... Tail>
166+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_negative<Seq...>, Tail...>) noexcept {
167+
return ctll::list<can_be_anything>{};
168+
}
169+
170+
// lookbehind_positive
171+
template <typename... Content, typename... Seq, typename... Tail>
172+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_positive<Seq...>, Tail...>) noexcept {
173+
return ctll::list<can_be_anything>{};
174+
}
175+
164176
// lookahead_negative TODO fixme
165177
template <typename... Content, typename... Seq, typename... Tail>
166178
constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_negative<Seq...>, Tail...>) noexcept {

single-header/ctre-unicode.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3859,6 +3859,18 @@ constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_positive<Seq..
38593859
return ctll::list<can_be_anything>{};
38603860
}
38613861

3862+
// lookbehind_negative TODO fixme
3863+
template <typename... Content, typename... Seq, typename... Tail>
3864+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_negative<Seq...>, Tail...>) noexcept {
3865+
return ctll::list<can_be_anything>{};
3866+
}
3867+
3868+
// lookbehind_positive
3869+
template <typename... Content, typename... Seq, typename... Tail>
3870+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_positive<Seq...>, Tail...>) noexcept {
3871+
return ctll::list<can_be_anything>{};
3872+
}
3873+
38623874
// lookahead_negative TODO fixme
38633875
template <typename... Content, typename... Seq, typename... Tail>
38643876
constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_negative<Seq...>, Tail...>) noexcept {

single-header/ctre.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3856,6 +3856,18 @@ constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_positive<Seq..
38563856
return ctll::list<can_be_anything>{};
38573857
}
38583858

3859+
// lookbehind_negative TODO fixme
3860+
template <typename... Content, typename... Seq, typename... Tail>
3861+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_negative<Seq...>, Tail...>) noexcept {
3862+
return ctll::list<can_be_anything>{};
3863+
}
3864+
3865+
// lookbehind_positive
3866+
template <typename... Content, typename... Seq, typename... Tail>
3867+
constexpr auto first(ctll::list<Content...>, ctll::list<lookbehind_positive<Seq...>, Tail...>) noexcept {
3868+
return ctll::list<can_be_anything>{};
3869+
}
3870+
38593871
// lookahead_negative TODO fixme
38603872
template <typename... Content, typename... Seq, typename... Tail>
38613873
constexpr auto first(ctll::list<Content...>, ctll::list<lookahead_negative<Seq...>, Tail...>) noexcept {

0 commit comments

Comments
 (0)