Skip to content

Commit

Permalink
Current working status.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxSagebaum committed Dec 21, 2023
1 parent 30098c6 commit 32e76e3
Show file tree
Hide file tree
Showing 4 changed files with 599 additions and 72 deletions.
2 changes: 1 addition & 1 deletion source/reflect.h
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ auto regex_gen(meta::type_declaration& t) -> void
CPP2_UFCS(remove_marked_members)(t);

for ( auto const& expr : expressions ) {
std::string regular_expression {::cpp2::regex::generate_template(expr.second)};
std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; // TODO: Lambda capture.

std::string name {expr.first};
if (!(CPP2_UFCS(empty)(name))) {
Expand Down
2 changes: 1 addition & 1 deletion source/reflect.h2
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ regex_gen: (inout t: meta::type_declaration) =
t.remove_marked_members();

for expressions do (expr) {
regular_expression: std::string = ::cpp2::regex::generate_template(expr.second);
regular_expression: std::string = ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message););

name: std::string = expr.first;
if !name.empty() {
Expand Down
Loading

0 comments on commit 32e76e3

Please sign in to comment.