WIP : AST serialization improvements

Code untestd its an initial draft
This commit is contained in:
2023-11-19 20:34:46 -05:00
parent 36ebbfe29b
commit 5c73fbee83
10 changed files with 1669 additions and 1211 deletions

View File

@ -379,16 +379,16 @@ CodeBody gen_ast_inlines()
rcast(AST*, ast)->Parent = Code::Global.ast;
}
String <typename>::to_string()
{
if ( ast == nullptr )
{
log_failure("Code::to_string: Cannot convert code to string, AST is null!");
return { nullptr };
}
return rcast(AST*, ast)->to_string();
}
// String <typename>::to_string()
// {
// if ( ast == nullptr )
// {
// log_failure("Code::to_string: Cannot convert code to string, AST is null!");
// return { nullptr };
// }
//
// return rcast(AST*, ast)->to_string();
// }
<typename>& <typename>::operator =( Code other )
{
if ( other.ast && other->Parent )