Code::duplicate reduction

This commit is contained in:
2024-12-02 00:16:11 -05:00
parent 37c33ffb3e
commit 007bfa0cb0
4 changed files with 15 additions and 305 deletions

View File

@ -166,10 +166,11 @@ String to_string (Code code);
*/
struct Code
{
AST* ast;
# define Using_Code( Typename ) \
char const* debug_str() { return GEN_NS debug_str(*this); } \
Code duplicate(); \
char const* debug_str() { return GEN_NS debug_str(* this); } \
Code duplicate() { return GEN_NS duplicate(* this); } \
bool is_equal( Code other ); \
bool is_body(); \
bool is_valid(); \
@ -207,8 +208,6 @@ struct Code
return *this;
}
AST* ast;
#ifdef GEN_ENFORCE_STRONG_CODE_TYPES
# define operator explicit operator
#endif