Single header generates again, some more cleanup.

Looking into properly dealing with empty lines...

I want to preserve the text's empty lines in the AST for serialization purposes (perserve formatting for gapes between definitions).
Don't want to introduce the possibility of it breaking though, so will have to ignore empty_lines in a general way (if they are in a bad spot).
Attempted to cover that by having TokArray::current() auto-skip empty lines and eat as well if the type doesn't match.
This commit is contained in:
2023-08-03 23:18:33 -04:00
parent 5d7dfaf666
commit d36c3fa847
20 changed files with 241 additions and 1704 deletions

View File

@ -12,3 +12,4 @@ struct Builder
void write();
};

View File

@ -1,8 +1,3 @@
#pragma once
#include "gen.hpp"
GEN_NS_BEGIN
Code scan_file( char const* path )
{
FileInfo file;
@ -28,6 +23,7 @@ Code scan_file( char const* path )
return untyped_str( str );
}
#if 0
struct Policy
{
// Nothing for now.
@ -69,5 +65,5 @@ struct Scanner
bool process_requests( Array<Receipt> out_receipts );
};
#endif
GEN_NS_END