@@ -3617,7 +3617,7 @@ std::string to_string_impl{" to_string_impl: (this, prefix: std::string_view"
36173617 CPP2_UFCS (add_member)(t, " to_code : (this) -> std::string = to_string_impl( \" " + cpp2::to_string (CPP2_UFCS (name)(t)) + " ::\" );" );
36183618 }
36193619{
3620- std::string from_string{" from_string: (s : std::string_view) -> " + cpp2::to_string (CPP2_UFCS (name)(t)) + " = { \n " };
3620+ std::string from_string{" from_string: (cpp2_s__ : std::string_view) -> " + cpp2::to_string (CPP2_UFCS (name)(t)) + " = { \n " };
36213621
36223622 // Provide a 'from_string' function to parse strings into enumerators
36233623
@@ -3634,11 +3634,11 @@ std::string from_string{" from_string: (s: std::string_view) -> " + cpp2::to_
36343634
36353635 from_string += " ret := none;\n "
36363636 " outer: do {\n "
3637- " for cpp2::string_util::split_string_list(s ) do (x) {\n " ;
3637+ " for cpp2::string_util::split_string_list(cpp2_s__ ) do (x) {\n " ;
36383638 }
36393639 // Otherwise, accept just a single string
36403640 else {
3641- from_string += " x := s ;\n " ;
3641+ from_string += " x := cpp2_s__ ;\n " ;
36423642 }
36433643{
36443644std::string_view else_{" " };
@@ -3659,7 +3659,7 @@ std::string_view else_{""};
36593659 " } while false;\n " ;
36603660 }
36613661
3662- from_string += " cpp2::type_safety.report_violation( (\" can't convert string '\" + cpp2::to_string(s ) + \" ' to " + cpp2::to_string (cpp2::move (prefix)) + " enum of type " + cpp2::to_string (CPP2_UFCS (name)(t)) + " \" ).c_str() );\n "
3662+ from_string += " cpp2::type_safety.report_violation( (\" can't convert string '\" + cpp2::to_string(cpp2_s__ ) + \" ' to " + cpp2::to_string (cpp2::move (prefix)) + " enum of type " + cpp2::to_string (CPP2_UFCS (name)(t)) + " \" ).c_str() );\n "
36633663 " return " + cpp2::to_string (cpp2::move (default_value)) + " ;\n "
36643664 " }\n\n " ;
36653665
@@ -3668,7 +3668,7 @@ std::string_view else_{""};
36683668}
36693669
36703670#line 1652 "reflect.h2"
3671- CPP2_UFCS (add_member)(t, " from_code: (s : std::string_view) -> " + cpp2::to_string (CPP2_UFCS (name)(t)) + " = { str: std::string = s ; return from_string( cpp2::string_util::replace_all(str, \" " + cpp2::to_string (CPP2_UFCS (name)(t)) + " ::\" , \"\" ) ); }" );
3671+ CPP2_UFCS (add_member)(t, " from_code: (cpp2_s__ : std::string_view) -> " + cpp2::to_string (CPP2_UFCS (name)(t)) + " = { str: std::string = cpp2_s__ ; return from_string( cpp2::string_util::replace_all(str, \" " + cpp2::to_string (CPP2_UFCS (name)(t)) + " ::\" , \"\" ) ); }" );
36723672}
36733673
36743674#line 1656 "reflect.h2"
0 commit comments