Finished AST/Code member inferface usage elimination in base library.

Now the lexer and parser need to be elimination...
This commit is contained in:
2024-12-02 20:20:30 -05:00
parent defe42c15c
commit 69a9abcd59
13 changed files with 277 additions and 492 deletions

View File

@ -358,12 +358,12 @@ CodeBody gen_ast_inlines()
{
if ( other.ast && other->Parent )
{
ast = rcast( decltype(ast), GEN_NS duplicate(other.ast) );
rcast( AST*, ast)->Parent = nullptr;
ast = rcast( decltype(ast), GEN_NS duplicate(other).ast);
ast->Parent = { nullptr };
}
ast = rcast( decltype(ast), other.ast );
return *this;
ast = rcast( decltype( ast ), other.ast );
return * this;
}
inline
<typename>::operator bool()
@ -448,10 +448,6 @@ CodeBody gen_ast_inlines()
append(impl_code_var, parse_global_body( token_fmt( "typename", StrC name(Var), codetype_impl_tmpl )));
char const* cast_tmpl = stringize(
inline AST::operator Code<typename>()
{
return { rcast( AST_<typename>*, this ) };
}
inline Code::operator Code<typename>() const
{
return { (AST_<typename>*) ast };