diff --git a/project/components/ast.cpp b/project/components/ast.cpp index 3abecb2..d8e6ff9 100644 --- a/project/components/ast.cpp +++ b/project/components/ast.cpp @@ -1005,6 +1005,25 @@ bool AST::is_equal( AST* other ) return false; \ } + #define check_member_content( content ) \ + if ( content != other->content ) \ + { \ + log_fmt("AST::is_equal: Member content - "#content " failed\n" \ + "AST : %S\n" \ + "Other: %S\n" \ + , debug_str() \ + , other->debug_str() \ + ); \ + \ + log_fmt("Content cannot be trusted to be unique with this check " \ + "so it must be verified by eye for now\n" \ + "AST Content:\n%S\n" \ + "Other Content:\n%S\n" \ + , content \ + , other->content \ + ); \ + } + #define check_member_ast( ast ) \ if ( ast ) \ { \ @@ -1039,12 +1058,6 @@ bool AST::is_equal( AST* other ) } \ } - // Need to check to make sure the prev->is_equal wont lead to a recursion. - // #define check_member_prev() \ - // if ( Prev ) \ - // { \ - - case NewLine: case Access_Public: case Access_Protected: @@ -1058,7 +1071,7 @@ bool AST::is_equal( AST* other ) case PlatformAttributes: case Untyped: { - check_member_str( Content ); + check_member_content( Content ); // check_member_ast( Prev ); // check_member_ast( Next ); } @@ -1340,7 +1353,7 @@ bool AST::is_equal( AST* other ) case Preprocess_Define: { check_member_str( Name ); - check_member_str( Content ); + check_member_content( Content ); // check_member_ast( Prev ); // check_member_ast( Next ); @@ -1352,7 +1365,7 @@ bool AST::is_equal( AST* other ) case Preprocess_IfNotDef: case Preprocess_ElIf: { - check_member_str( Content ); + check_member_content( Content ); // check_member_ast( Prev ); // check_member_ast( Next ); @@ -1362,7 +1375,7 @@ bool AST::is_equal( AST* other ) case Preprocess_Include: case Preprocess_Pragma: { - check_member_str( Content ); + check_member_content( Content ); // check_member_ast( Prev ); // check_member_ast( Next ); diff --git a/project/components/interface.parsing.cpp b/project/components/interface.parsing.cpp index 720ade6..c568273 100644 --- a/project/components/interface.parsing.cpp +++ b/project/components/interface.parsing.cpp @@ -4502,7 +4502,7 @@ CodeType parse_type( bool* is_function ) brute_sig.Length = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)brute_sig.Text; is_first_capture = false; } - + bool is_param_pack = false; if ( check(TokType::Varadic_Argument) ) { @@ -4534,7 +4534,7 @@ CodeType parse_type( bool* is_function ) if ( attributes ) result->Attributes = attributes; - + if ( is_param_pack ) result->IsParamPack = true;