2023-08-28 20:46:50 -07:00
|
|
|
#ifdef GEN_INTELLISENSE_DIRECTIVES
|
2023-08-21 22:51:59 -07:00
|
|
|
#pragma once
|
2023-09-25 13:42:29 -07:00
|
|
|
#include "components/types.hpp"
|
2023-08-28 20:46:50 -07:00
|
|
|
#endif
|
|
|
|
|
2023-08-22 21:05:58 -07:00
|
|
|
// This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp)
|
2023-08-21 20:28:39 -07:00
|
|
|
|
|
|
|
#pragma region generated code inline implementation
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline Code& Code::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeBody& CodeBody::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeBody::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeAttributes& CodeAttributes::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeAttributes::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeAttributes::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Attributes* CodeAttributes::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeComment& CodeComment::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeComment::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeComment::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Comment* CodeComment::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeConstructor& CodeConstructor::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeConstructor::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeConstructor::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Constructor* CodeConstructor::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeClass& CodeClass::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeClass::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeDefine& CodeDefine::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeDefine::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeDefine::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Define* CodeDefine::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeDestructor& CodeDestructor::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeDestructor::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeDestructor::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Destructor* CodeDestructor::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeEnum& CodeEnum::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeEnum::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeEnum::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Enum* CodeEnum::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeExec& CodeExec::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeExec::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeExec::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Exec* CodeExec::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeExtern& CodeExtern::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeExtern::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeExtern::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Extern* CodeExtern::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeFriend& CodeFriend::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeFriend::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeFriend::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Friend* CodeFriend::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeFn& CodeFn::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeFn::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeFn::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Fn* CodeFn::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeInclude& CodeInclude::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeInclude::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeInclude::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Include* CodeInclude::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeModule& CodeModule::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeModule::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeModule::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Module* CodeModule::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeNS& CodeNS::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeNS::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeNS::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_NS* CodeNS::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeOperator& CodeOperator::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeOperator::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeOperator::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Operator* CodeOperator::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeOpCast& CodeOpCast::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeOpCast::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeOpCast::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_OpCast* CodeOpCast::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeParam& CodeParam::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeParam::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodePragma& CodePragma::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodePragma::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodePragma::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Pragma* CodePragma::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodePreprocessCond& CodePreprocessCond::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodePreprocessCond::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodePreprocessCond::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_PreprocessCond* CodePreprocessCond::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeSpecifiers& CodeSpecifiers::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeSpecifiers::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeStruct& CodeStruct::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeStruct::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeTemplate& CodeTemplate::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeTemplate::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeTemplate::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Template* CodeTemplate::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeType& CodeType::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeType::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeType::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Type* CodeType::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeTypedef& CodeTypedef::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeTypedef::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeTypedef::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Typedef* CodeTypedef::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeUnion& CodeUnion::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeUnion::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeUnion::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Union* CodeUnion::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeUsing& CodeUsing::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeUsing::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeUsing::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Using* CodeUsing::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline CodeVar& CodeVar::operator=( Code other )
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( other.ast && other->Parent )
|
|
|
|
{
|
2024-12-02 00:18:52 -08:00
|
|
|
ast = rcast( decltype( ast ), GEN_NS duplicate( other.ast ) );
|
2023-08-21 20:28:39 -07:00
|
|
|
rcast( AST*, ast )->Parent = nullptr;
|
|
|
|
}
|
|
|
|
ast = rcast( decltype( ast ), other.ast );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeVar::operator bool()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return ast != nullptr;
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline CodeVar::operator Code()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return *rcast( Code*, this );
|
|
|
|
}
|
|
|
|
|
2024-10-24 23:59:56 -07:00
|
|
|
inline AST_Var* CodeVar::operator->()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
if ( ast == nullptr )
|
|
|
|
{
|
|
|
|
log_failure( "Attempt to dereference a nullptr!" );
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return ast;
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma endregion generated code inline implementation
|
|
|
|
|
|
|
|
#pragma region generated AST/Code cast implementation
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeBody()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Body*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeBody() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Body*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeAttributes()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Attributes*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeAttributes() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Attributes*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeComment()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Comment*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeComment() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Comment*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeConstructor()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Constructor*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeConstructor() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Constructor*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeClass()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Class*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeClass() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Class*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeDefine()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Define*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeDefine() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Define*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeDestructor()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Destructor*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeDestructor() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Destructor*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeEnum()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Enum*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeEnum() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Enum*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeExec()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Exec*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeExec() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Exec*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeExtern()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Extern*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeExtern() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Extern*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeFriend()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Friend*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeFriend() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Friend*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeFn()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Fn*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeFn() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Fn*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeInclude()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Include*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeInclude() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Include*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeModule()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Module*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeModule() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Module*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeNS()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_NS*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeNS() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_NS*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeOperator()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Operator*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeOperator() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Operator*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeOpCast()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_OpCast*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeOpCast() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_OpCast*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeParam()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Param*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeParam() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Param*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodePragma()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Pragma*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodePragma() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Pragma*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodePreprocessCond()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_PreprocessCond*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodePreprocessCond() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_PreprocessCond*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeSpecifiers()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Specifiers*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeSpecifiers() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Specifiers*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeStruct()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Struct*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeStruct() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Struct*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeTemplate()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Template*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeTemplate() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Template*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeType()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Type*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeType() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Type*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeTypedef()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Typedef*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeTypedef() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Typedef*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeUnion()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Union*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeUnion() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Union*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeUsing()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Using*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeUsing() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Using*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline AST::operator CodeVar()
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
|
|
|
return { rcast( AST_Var*, this ) };
|
|
|
|
}
|
|
|
|
|
2024-10-25 01:08:20 -07:00
|
|
|
inline Code::operator CodeVar() const
|
2023-08-21 20:28:39 -07:00
|
|
|
{
|
2024-04-17 14:40:32 -07:00
|
|
|
return { (AST_Var*)ast };
|
2023-08-21 20:28:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#pragma endregion generated AST / Code cast implementation
|