WIP - Broken Compile : Added pragma once and includes to all files + Parser fixes, and String improvements

Adding the pragma once and includes the files broke compilation, still diagnosing why.

- Some string functions were moved to the cpp, still need to do some more evaluation of it and the containers...
- Added support for forceinline and neverinline to parsing (untested)
- Added support for specifiers in operator cast such as explicit, inline/forceinline/neverinline, etc.
    - Before it only support const.
    - Still need to support volatile.
- Forceinline was not supported at all for tokenization, fixed that.
This commit is contained in:
2023-08-21 20:30:13 -04:00
parent 1241f44fd4
commit 050b00f28a
45 changed files with 326 additions and 165 deletions

View File

@ -157,9 +157,13 @@ CodeBody gen_especifier( char const* path )
#pragma push_macro( "local_persist" )
#pragma push_macro( "do_once_start" )
#pragma push_macro( "do_once_end" )
#pragma push_macro( "forceinline" )
#pragma push_macro( "neverinline" )
#undef local_persist
#undef do_once_start
#undef do_once_end
#undef forceinline
#undef neverinline
CodeFn to_str = parse_function(token_fmt("entries", (StrC)to_str_entries, stringize(
StrC to_str( Type type )
{
@ -202,6 +206,8 @@ CodeBody gen_especifier( char const* path )
#pragma pop_macro( "local_persist" )
#pragma pop_macro( "do_once_start" )
#pragma pop_macro( "do_once_end" )
#pragma pop_macro( "forceinline" )
#pragma pop_macro( "neverinline" )
CodeNS nspace = def_namespace( name(ESpecifier), def_namespace_body( args( enum_code, is_trailing, to_str, to_type ) ) );