mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-16 19:51:47 -07:00
misc changes to clang format spacing
This commit is contained in:
@ -7,14 +7,14 @@
|
||||
|
||||
#pragma region generated code inline implementation
|
||||
|
||||
inline Code& Code::operator=( Code other )
|
||||
inline Code& Code::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -23,14 +23,14 @@ inline Code::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeBody& CodeBody::operator=( Code other )
|
||||
inline CodeBody& CodeBody::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -39,14 +39,14 @@ inline CodeBody::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeAttributes& CodeAttributes::operator=( Code other )
|
||||
inline CodeAttributes& CodeAttributes::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -57,27 +57,27 @@ inline CodeAttributes::operator bool()
|
||||
|
||||
inline CodeAttributes::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Attributes* CodeAttributes::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeComment& CodeComment::operator=( Code other )
|
||||
inline CodeComment& CodeComment::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -88,27 +88,27 @@ inline CodeComment::operator bool()
|
||||
|
||||
inline CodeComment::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Comment* CodeComment::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeConstructor& CodeConstructor::operator=( Code other )
|
||||
inline CodeConstructor& CodeConstructor::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -119,27 +119,27 @@ inline CodeConstructor::operator bool()
|
||||
|
||||
inline CodeConstructor::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Constructor* CodeConstructor::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeClass& CodeClass::operator=( Code other )
|
||||
inline CodeClass& CodeClass::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -148,14 +148,14 @@ inline CodeClass::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeDefine& CodeDefine::operator=( Code other )
|
||||
inline CodeDefine& CodeDefine::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -166,27 +166,27 @@ inline CodeDefine::operator bool()
|
||||
|
||||
inline CodeDefine::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Define* CodeDefine::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeDefineParams& CodeDefineParams::operator=( Code other )
|
||||
inline CodeDefineParams& CodeDefineParams::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -195,14 +195,14 @@ inline CodeDefineParams::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeDestructor& CodeDestructor::operator=( Code other )
|
||||
inline CodeDestructor& CodeDestructor::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -213,27 +213,27 @@ inline CodeDestructor::operator bool()
|
||||
|
||||
inline CodeDestructor::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Destructor* CodeDestructor::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeEnum& CodeEnum::operator=( Code other )
|
||||
inline CodeEnum& CodeEnum::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -244,27 +244,27 @@ inline CodeEnum::operator bool()
|
||||
|
||||
inline CodeEnum::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Enum* CodeEnum::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeExec& CodeExec::operator=( Code other )
|
||||
inline CodeExec& CodeExec::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -275,27 +275,27 @@ inline CodeExec::operator bool()
|
||||
|
||||
inline CodeExec::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Exec* CodeExec::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeExtern& CodeExtern::operator=( Code other )
|
||||
inline CodeExtern& CodeExtern::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -306,27 +306,27 @@ inline CodeExtern::operator bool()
|
||||
|
||||
inline CodeExtern::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Extern* CodeExtern::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeFriend& CodeFriend::operator=( Code other )
|
||||
inline CodeFriend& CodeFriend::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -337,27 +337,27 @@ inline CodeFriend::operator bool()
|
||||
|
||||
inline CodeFriend::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Friend* CodeFriend::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeFn& CodeFn::operator=( Code other )
|
||||
inline CodeFn& CodeFn::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -368,27 +368,27 @@ inline CodeFn::operator bool()
|
||||
|
||||
inline CodeFn::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Fn* CodeFn::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeInclude& CodeInclude::operator=( Code other )
|
||||
inline CodeInclude& CodeInclude::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -399,27 +399,27 @@ inline CodeInclude::operator bool()
|
||||
|
||||
inline CodeInclude::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Include* CodeInclude::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeModule& CodeModule::operator=( Code other )
|
||||
inline CodeModule& CodeModule::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -430,27 +430,27 @@ inline CodeModule::operator bool()
|
||||
|
||||
inline CodeModule::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Module* CodeModule::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeNS& CodeNS::operator=( Code other )
|
||||
inline CodeNS& CodeNS::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -461,27 +461,27 @@ inline CodeNS::operator bool()
|
||||
|
||||
inline CodeNS::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_NS* CodeNS::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeOperator& CodeOperator::operator=( Code other )
|
||||
inline CodeOperator& CodeOperator::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -492,27 +492,27 @@ inline CodeOperator::operator bool()
|
||||
|
||||
inline CodeOperator::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Operator* CodeOperator::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeOpCast& CodeOpCast::operator=( Code other )
|
||||
inline CodeOpCast& CodeOpCast::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -523,27 +523,27 @@ inline CodeOpCast::operator bool()
|
||||
|
||||
inline CodeOpCast::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_OpCast* CodeOpCast::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeParams& CodeParams::operator=( Code other )
|
||||
inline CodeParams& CodeParams::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -552,14 +552,14 @@ inline CodeParams::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodePragma& CodePragma::operator=( Code other )
|
||||
inline CodePragma& CodePragma::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -570,27 +570,27 @@ inline CodePragma::operator bool()
|
||||
|
||||
inline CodePragma::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Pragma* CodePragma::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodePreprocessCond& CodePreprocessCond::operator=( Code other )
|
||||
inline CodePreprocessCond& CodePreprocessCond::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -601,27 +601,27 @@ inline CodePreprocessCond::operator bool()
|
||||
|
||||
inline CodePreprocessCond::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_PreprocessCond* CodePreprocessCond::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeSpecifiers& CodeSpecifiers::operator=( Code other )
|
||||
inline CodeSpecifiers& CodeSpecifiers::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -630,14 +630,14 @@ inline CodeSpecifiers::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeStruct& CodeStruct::operator=( Code other )
|
||||
inline CodeStruct& CodeStruct::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -646,14 +646,14 @@ inline CodeStruct::operator bool()
|
||||
return ast != nullptr;
|
||||
}
|
||||
|
||||
inline CodeTemplate& CodeTemplate::operator=( Code other )
|
||||
inline CodeTemplate& CodeTemplate::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -664,27 +664,27 @@ inline CodeTemplate::operator bool()
|
||||
|
||||
inline CodeTemplate::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Template* CodeTemplate::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeTypename& CodeTypename::operator=( Code other )
|
||||
inline CodeTypename& CodeTypename::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -695,27 +695,27 @@ inline CodeTypename::operator bool()
|
||||
|
||||
inline CodeTypename::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Typename* CodeTypename::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeTypedef& CodeTypedef::operator=( Code other )
|
||||
inline CodeTypedef& CodeTypedef::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -726,27 +726,27 @@ inline CodeTypedef::operator bool()
|
||||
|
||||
inline CodeTypedef::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Typedef* CodeTypedef::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeUnion& CodeUnion::operator=( Code other )
|
||||
inline CodeUnion& CodeUnion::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -757,27 +757,27 @@ inline CodeUnion::operator bool()
|
||||
|
||||
inline CodeUnion::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Union* CodeUnion::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeUsing& CodeUsing::operator=( Code other )
|
||||
inline CodeUsing& CodeUsing::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -788,27 +788,27 @@ inline CodeUsing::operator bool()
|
||||
|
||||
inline CodeUsing::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Using* CodeUsing::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
inline CodeVar& CodeVar::operator=( Code other )
|
||||
inline CodeVar& CodeVar::operator=(Code other)
|
||||
{
|
||||
if ( other.ast != nullptr && other->Parent != nullptr )
|
||||
if (other.ast != nullptr && other->Parent != nullptr)
|
||||
{
|
||||
ast = rcast( decltype( ast ), code_duplicate( other ).ast );
|
||||
ast = rcast(decltype(ast), code_duplicate(other).ast);
|
||||
ast->Parent = { nullptr };
|
||||
}
|
||||
ast = rcast( decltype( ast ), other.ast );
|
||||
ast = rcast(decltype(ast), other.ast);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -819,14 +819,14 @@ inline CodeVar::operator bool()
|
||||
|
||||
inline CodeVar::operator Code()
|
||||
{
|
||||
return *rcast( Code*, this );
|
||||
return *rcast(Code*, this);
|
||||
}
|
||||
|
||||
inline AST_Var* CodeVar::operator->()
|
||||
{
|
||||
if ( ast == nullptr )
|
||||
if (ast == nullptr)
|
||||
{
|
||||
log_failure( "Attempt to dereference a nullptr!\n" );
|
||||
log_failure("Attempt to dereference a nullptr!\n");
|
||||
return nullptr;
|
||||
}
|
||||
return ast;
|
||||
|
Reference in New Issue
Block a user