Improved singleheader test

Need to make the debug_str provided by the AST type aware to provide as much contextual information as possible (finally got to this point with validation).

Singleheader test now directly calls clang-format to cleanup the reconstructed copy of the singleheader. Its needed to remove any sort of formatting discrepancies found by the parser since its sensistive to that for new-lines, etc.
This commit is contained in:
2023-09-05 13:36:59 -04:00
parent 3e249d9bc5
commit 2200bcde9a
3 changed files with 29 additions and 13 deletions

View File

@ -4554,8 +4554,7 @@ CodeTemplate parse_template( StrC def )
AST_1->Name: (* A ( int (*) (short a,unsigned b,long c) ) )
AST_2->Name: (* A ( int(*)(short a, unsigned b, long c) ) )
The excess whitespace can be stripped however, because there is no semantic awareness within the first capture group,
it cannot entirely remove the whitespaceto remove insignificant whitespace.
The excess whitespace cannot be stripped however, because there is no semantic awareness within the first capture group.
*/
internal
CodeType parse_type( bool* typedef_is_function )
@ -4894,9 +4893,10 @@ CodeType parse_type( bool* typedef_is_function )
result = (CodeType) make_code();
result->Type = Typename;
// Need to wait until were using the new parsing method to do this.
String
name_stripped = String::make( GlobalAllocator, name );
name_stripped.strip_space();
// name_stripped.strip_space();
#ifdef GEN_USE_NEW_TYPENAME_PARSING
if ( params_nested )