mirror of
https://github.com/Ed94/gencpp.git
synced 2025-07-04 04:41:02 -07:00
Code::is_equal reduction
This commit is contained in:
@ -121,6 +121,18 @@ bool is_body(Code code)
|
||||
return false;
|
||||
}
|
||||
|
||||
inline
|
||||
bool is_equal( Code self, Code other )
|
||||
{
|
||||
if ( self.ast == nullptr || other.ast == nullptr )
|
||||
{
|
||||
// Just check if they're both null.
|
||||
// log_failure( "Code::is_equal: Cannot compare code, AST is null!" );
|
||||
return self.ast == nullptr && other.ast == nullptr;
|
||||
}
|
||||
return is_equal( self.ast, other.ast );
|
||||
}
|
||||
|
||||
inline
|
||||
Code& Code::operator ++()
|
||||
{
|
||||
|
Reference in New Issue
Block a user