This commit is contained in:
2024-12-01 23:35:58 -05:00
parent fec709cc76
commit f9c21ebc04
13 changed files with 540 additions and 508 deletions

View File

@ -21,7 +21,7 @@ Builder Builder::open( char const* path )
void Builder::pad_lines( s32 num )
{
append( Buffer, "\n" );
append( & Buffer, "\n" );
}
void Builder::print( Code code )
@ -29,7 +29,7 @@ void Builder::print( Code code )
String str = code->to_string();
// const ssize len = str.length();
// log_fmt( "%s - print: %.*s\n", File.filename, len > 80 ? 80 : len, str.Data );
append( Buffer, str );
append( & Buffer, str );
}
void Builder::print_fmt( char const* fmt, ... )
@ -43,7 +43,7 @@ void Builder::print_fmt( char const* fmt, ... )
va_end( va );
// log_fmt( "$%s - print_fmt: %.*s\n", File.filename, res > 80 ? 80 : res, buf );
append( Buffer, buf, res );
append( & Buffer, buf, res );
}
void Builder::write()
@ -55,5 +55,5 @@ void Builder::write()
log_fmt( "Generated: %s\n", File.filename );
file_close( & File );
free(Buffer);
free(& Buffer);
}

View File

@ -25,7 +25,7 @@ Code scan_file( char const* path )
String str = string_make_reserve( GlobalAllocator, fsize );
file_read( & file, str, fsize );
get_header(str).Length = fsize;
get_header(str)->Length = fsize;
// Skip GEN_INTELLISENSE_DIRECTIVES preprocessor blocks
// Its designed so that the directive should be the first thing in the file.
@ -97,12 +97,12 @@ Code scan_file( char const* path )
if ( (scanner + 2) >= ( str.Data + fsize ) )
{
mem_move( str, scanner, left );
get_header(str).Length = left;
get_header(str)->Length = left;
break;
}
mem_move( str, scanner, left );
get_header(str).Length = left;
get_header(str)->Length = left;
break;
}