Got past parsing, fixing serialization

This commit is contained in:
2023-08-01 14:02:54 -04:00
parent 528ef72a51
commit 0f16d1131e
6 changed files with 252 additions and 80 deletions

View File

@ -26,12 +26,29 @@ void AST::append( AST* other )
char const* AST::debug_str()
{
if ( Parent )
{
char const* fmt = stringize(
\nType : %s
\nParent : %s %s
\nName : %s
);
// These should be used immediately in a log.
// Thus if its desired to keep the debug str
// for multiple calls to bprintf,
// allocate this to proper string.
return str_fmt_buf( fmt
, type_str()
, Parent->Name
, Parent->type_str()
, Name ? Name : ""
);
}
char const* fmt = stringize(
\nCode Debug:
\nType : %s
\nParent : %s
\nName : %s
\nComment : %s
);
// These should be used immediately in a log.
@ -40,7 +57,6 @@ char const* AST::debug_str()
// allocate this to proper string.
return str_fmt_buf( fmt
, type_str()
, Parent ? Parent->Name : ""
, Name ? Name : ""
);
}