mirror of
https://github.com/Ed94/gencpp.git
synced 2025-07-03 20:31:03 -07:00
Code::set_global reduction
This commit is contained in:
@ -139,6 +139,18 @@ bool is_valid(Code self)
|
||||
return self.ast != nullptr && self.ast->Type != CodeT::Invalid;
|
||||
}
|
||||
|
||||
inline
|
||||
void set_global(Code self)
|
||||
{
|
||||
if ( self.ast == nullptr )
|
||||
{
|
||||
log_failure("Code::set_global: Cannot set code as global, AST is null!");
|
||||
return;
|
||||
}
|
||||
|
||||
self->Parent = Code_Global.ast;
|
||||
}
|
||||
|
||||
inline
|
||||
Code& Code::operator ++()
|
||||
{
|
||||
|
Reference in New Issue
Block a user