mirror of
https://github.com/Ed94/gencpp.git
synced 2025-07-03 20:31:03 -07:00
reduction of Code struct member function usage in base lib
This commit is contained in:
@ -157,9 +157,8 @@ namespace parser
|
||||
struct Token;
|
||||
}
|
||||
|
||||
template< class Type> forceinline Type tmpl_cast( Code* self ) { return * rcast( Type*, self ); }
|
||||
#if ! GEN_COMPILER_C && 0
|
||||
template< class Type> forceinline Type tmpl_cast( Code& self ) { return * rcast( Type*, & self ); }
|
||||
#if ! GEN_COMPILER_C
|
||||
template< class Type> forceinline Type tmpl_cast( Code self ) { return * rcast( Type*, & self ); }
|
||||
#endif
|
||||
|
||||
char const* debug_str (Code code);
|
||||
@ -195,16 +194,13 @@ struct Code
|
||||
bool operator !=( Code other ) { return (AST*)ast != other.ast; } \
|
||||
operator bool();
|
||||
|
||||
#if GEN_SUPPORT_CPP_MEMBER_FEATURES || 1
|
||||
#if GEN_SUPPORT_CPP_MEMBER_FEATURES
|
||||
Using_Code( Code );
|
||||
String to_string() { return GEN_NS to_string(* this); }
|
||||
#endif
|
||||
|
||||
Using_CodeOps( Code );
|
||||
|
||||
template< class Type >
|
||||
forceinline Type code_cast() { return * rcast( Type*, this ); }
|
||||
|
||||
AST* operator ->() { return ast; }
|
||||
Code& operator ++();
|
||||
|
||||
|
Reference in New Issue
Block a user