Compare commits

...

9 Commits

61 changed files with 111 additions and 87 deletions

View File

@ -11,6 +11,14 @@ These build up a code AST to then serialize with a file builder, or can be trave
This code base attempts follow the [handmade philosophy](https://handmade.network/manifesto).
Its not meant to be a black box metaprogramming utility, it should be easy to integrate into a user's project domain.
## Langauge Bindings
* [gencpp-odin](https://github.com/Ed94/gencpp-odin): Bindings for the odin programming language.
## Utility Libraries
* [UnrealGencpp](https://github.com/Ed94/UnrealGencpp): Setup as a plugin to integrate into Unreal Engine or Unreal Projects.
## Documentation
* [docs - General](./docs/Readme.md): Overview and additional docs

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# include "builder.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "helpers/push_ignores.inline.hpp"
# include "components/header_start.hpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "helpers/push_ignores.inline.hpp"
# include "components/header_start.hpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# include "scanner.hpp"
#endif
@ -24,7 +24,7 @@ Code scan_file( char const* path )
file_read( & file, str, fsize );
strbuilder_get_header(str)->Length = fsize;
// Skip GEN_INTELLISENSE_DIRECTIVES preprocessor blocks
// Skip INTELLISENSE_DIRECTIVES preprocessor blocks
// Its designed so that the directive should be the first thing in the file.
// Anything that comes before it will also be omitted.
{
@ -33,7 +33,7 @@ Code scan_file( char const* path )
#define move_fwd() do { ++ scanner; -- left; } while (0)
const Str directive_start = txt( "ifdef" );
const Str directive_end = txt( "endif" );
const Str def_intellisense = txt("GEN_INTELLISENSE_DIRECTIVES" );
const Str def_intellisense = txt("INTELLISENSE_DIRECTIVES" );
bool found_directive = false;
char const* scanner = (char const*)str;

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "helpers/push_ignores.inline.hpp"
# include "components/header_start.hpp"

View File

@ -30,7 +30,7 @@ int gen_main()
gen::init( & ctx);
CodeBody gen_component_header = def_global_body( args(
def_preprocess_cond( PreprocessCond_IfDef, txt("GEN_INTELLISENSE_DIRECTIVES") ),
def_preprocess_cond( PreprocessCond_IfDef, txt("INTELLISENSE_DIRECTIVES") ),
pragma_once,
def_include(txt("components/types.hpp")),
preprocess_endif,

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "static_data.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "types.hpp"
#include "gen/ecode.hpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "code_types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "ast.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "ast.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "interface.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "components/types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "interface.hpp"
#endif
@ -484,7 +484,7 @@ void class_add_interface( CodeClass self, CodeTypename type )
possible_slot = cast(CodeTypename, possible_slot->Next);
}
possible_slot->Next = type;
possible_slot->Next = cast(Code, type);
}
#pragma endregion CodeClass
@ -700,10 +700,10 @@ void struct_add_interface(CodeStruct self, CodeTypename type )
while ( possible_slot->Next != nullptr )
{
possible_slot->Next = cast(CodeTypename, possible_slot->Next);
possible_slot = cast(CodeTypename, possible_slot->Next);
}
possible_slot->Next = type;
possible_slot->Next = cast(Code, type);
}
#pragma endregion Code

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "code_serialization.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "ast_types.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "gen/etoktype.cpp"
#include "interface.upfront.cpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "interface.parsing.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "interface.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "interface.upfront.cpp"
#include "gen/etoktype.cpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "gen/etoktype.cpp"
#include "parser_case_macros.cpp"
@ -1365,8 +1365,10 @@ Code parse_assignment_expression()
eat( currtok.Type );
}
expr_tok.Text.Len = ( ( sptr )currtok.Text.Ptr + currtok.Text.Len ) - ( sptr )expr_tok.Text.Ptr - 1;
expr = untyped_str( expr_tok.Text );
if (left) {
expr_tok.Text.Len = ( ( sptr )currtok.Text.Ptr + currtok.Text.Len ) - ( sptr )expr_tok.Text.Ptr - 1;
}
expr = untyped_str( expr_tok.Text );
// = <Expression>
return expr;
}

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "types.hpp"
#include "gen/ecode.hpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "../gen.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "header_start.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "macros.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "printing.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "src_start.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "dependencies/platform.hpp"
# include "dependencies/macros.hpp"

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "strings.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "strings.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "memory.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
#pragma once
#include "containers.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "platform.hpp"
#endif
@ -26,7 +26,7 @@
#endif // GEN_API
#ifndef global // Global variables
# ifdef GEN_DYN_EXPORT
# if defined(GEN_STATIC_LINK) || defined(GEN_DYN_LINK)
# define global
# else
# define global static

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "printing.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "debug.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "parsing.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "timing.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "strbuilder_ops.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "strbuilder_ops.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "header_start.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "debug.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "memory.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "hashing.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "hashing.hpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "filesystem.cpp"
#endif

View File

@ -1,4 +1,4 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "filesystem.hpp"
#endif

View File

@ -1,6 +1,6 @@
#pragma once
#if GEN_INTELLISENSE_DIRECTIVES
#if INTELLISENSE_DIRECTIVES
# include "../gen.hpp"
# include "misc.hpp"

View File

@ -1,6 +1,6 @@
#pragma once
#ifdef GEN_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
# define GEN_ENFORCE_STRONG_CODE_TYPES
# define GEN_EXPOSE_BACKEND

View File

@ -306,7 +306,7 @@ do \
break;
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_memory, header_memory );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_memory, header_memory );
if (found) break;
header_memory.append(entry);
@ -334,7 +334,7 @@ do \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_printing, header_printing );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_printing, header_printing );
if (found) break;
header_printing.append(entry);
@ -391,7 +391,7 @@ do \
case CT_Preprocess_IfDef:
{
ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_strings, header_strings );
ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_strings, header_strings );
}
break;
@ -472,7 +472,7 @@ do \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_filesystem, header_filesystem );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_filesystem, header_filesystem );
if (found) break;
header_filesystem.append(entry);
@ -532,7 +532,7 @@ do \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_parsing, header_parsing );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_parsing, header_parsing );
if (found) break;
header_parsing.append(entry);
@ -640,7 +640,7 @@ do \
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_types, types );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_types, types );
if (found) break;
types.append(entry);
@ -702,7 +702,7 @@ do \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_parser_types, parser_types );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_parser_types, parser_types );
if (found) break;
parser_types.append(entry);
@ -797,7 +797,7 @@ do \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_ast, ast );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_ast, ast );
if (found) break;
found = ignore_preprocess_cond_block(txt("GEN_EXECUTION_EXPRESSION_SUPPORT"), entry, parsed_ast, ast );
@ -978,7 +978,7 @@ R"(#define AST_ArrSpecs_Cap \
++ entry; // Skip a newline...
break;
}
found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_code_types, code_types );
found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_code_types, code_types );
if (found) break;
found = ignore_preprocess_cond_block(txt("GEN_EXECUTION_EXPRESSION_SUPPORT"), entry, parsed_code_types, code_types);
@ -1078,7 +1078,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
case CT_Preprocess_If:
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_ast_types, ast_types );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_ast_types, ast_types );
if (found) break;
found = ignore_preprocess_cond_block(txt("GEN_EXECUTION_EXPRESSION_SUPPORT"), entry, parsed_ast_types, ast_types);
@ -1132,7 +1132,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
case CT_Preprocess_If:
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_interface, interface );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_interface, interface );
if (found) break;
found = ignore_preprocess_cond_block(txt("GEN_COMPILER_CPP"), entry, parsed_interface, interface);
@ -1221,7 +1221,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
case CT_Preprocess_If:
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_inlines, inlines );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_inlines, inlines );
if (found) break;
found = ignore_preprocess_cond_block(txt("GEN_COMPILER_CPP"), entry, parsed_interface, interface);
@ -1263,7 +1263,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_constants, constants );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_constants, constants );
if (found) break;
constants.append(entry);
@ -1302,7 +1302,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_builder, header_builder );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_header_builder, header_builder );
if (found) break;
header_builder.append(entry);
@ -1446,7 +1446,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_src_ast, src_ast );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_src_ast, src_ast );
if (found) break;
src_ast.append(entry);
@ -1481,7 +1481,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_src_upfront, src_upfront );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_src_upfront, src_upfront );
if (found) break;
src_upfront.append(entry);
@ -1520,7 +1520,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_src_lexer, src_lexer );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_src_lexer, src_lexer );
if (found) break;
src_lexer.append(entry);
@ -1569,7 +1569,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{
case CT_Preprocess_IfDef:
{
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_src_parser, src_parser );
b32 found = ignore_preprocess_cond_block(txt("INTELLISENSE_DIRECTIVES"), entry, parsed_src_parser, src_parser );
if (found) break;
src_parser.append(entry);
@ -1882,6 +1882,9 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( r_header_macros );
header.print( header_generic_macros );
header.print_fmt( "\nGEN_API_C_BEGIN\n" );
header.print( r_header_basic_types );
header.print( r_header_debug );
header.print( rf_header_memory );
@ -1895,6 +1898,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( r_header_timing );
header.print(rf_header_parsing );
header.print_fmt( "\nGEN_API_C_END\n" );
header.print_fmt( "\nGEN_NS_END\n" );
header.write();
}
@ -1949,6 +1953,15 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( rf_ast_types );
header.print_fmt("\n#pragma endregion AST\n");
header.print( fmt_newline);
header.print( rf_array_arena );
header.print( fmt_newline);
header.print( rf_array_pool);
header.print( fmt_newline);
header.print( rf_array_string_cached );
header.print( fmt_newline);
header.print( rf_ht_preprocessor_macro );
header.print( rf_interface );
header.print( rf_constants );
header.print(fmt_newline);
@ -1958,7 +1971,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print_fmt("#pragma endregion Inlines\n");
header.print(fmt_newline);
header.print( rf_array_string_cached );
header.print( rf_header_builder );
header.print( rf_header_scanner );
@ -1976,11 +1988,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
builder_print( src, src_start );
src.print_fmt( "\nGEN_NS_BEGIN\n");
src.print( fmt_newline);
src.print( rf_array_arena );
src.print( fmt_newline);
src.print( rf_array_pool);
src.print( r_src_static_data );
src.print( fmt_newline);
@ -1998,6 +2005,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
src.print( fmt_newline);
src.print( rf_array_code_typename );
src.print( fmt_newline);
src.print( r_src_parser_case_macros );
src.print( rf_src_parser );
src.print( r_src_parsing );
src.print_fmt( "\n#pragma endregion Parsing\n" );

View File

@ -1,3 +1,6 @@
#define GEN_IMPLEMENTATION
#define GEN_DONT_ENFORCE_GEN_TIME_GUARD
#define GEN_DEFINE_LIBRARY_CORE_CONSTANTS
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#include "gen/gen_singleheader.h"

View File

@ -114,7 +114,7 @@ int gen_main()
}
CodeBody gen_component_header = def_global_body( args(
def_preprocess_cond( PreprocessCond_IfDef, txt("GEN_INTELLISENSE_DIRECTIVES") ),
def_preprocess_cond( PreprocessCond_IfDef, txt("INTELLISENSE_DIRECTIVES") ),
pragma_once,
def_include(txt("components/types.hpp")),
preprocess_endif,

View File

@ -24,4 +24,5 @@ Final, final
NoExceptions, noexcept
Override, override
Pure, = 0
Delete, = delete
Volatile, volatile

1 Invalid INVALID
24 NoExceptions noexcept
25 Override override
26 Pure = 0
27 Delete = delete
28 Volatile volatile

View File

@ -263,6 +263,7 @@ if ( $c_lib_static )
$compiler_args += $flag_all_c
$compiler_args += $flag_updated_cpp_macro
$compiler_args += $flag_c11
$compiler_args += ($flag_define + 'GEN_STATIC_LINK')
$linker_args = @()
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_lib

View File

@ -564,6 +564,7 @@ if ( $vendor -match "msvc" )
# Check if output is a static library
if ( $binary -match '\.lib$' )
{
write-host "Running archiver for $binary"
$lib_args = @()
$lib_args += $flag_nologo
$lib_args += $flag_link_win_machine_64

View File

@ -1,4 +1,4 @@
#if GEN_INTELLISENSE_DIRECTIVES
#if INTELLISENSE_DIRECTIVES
#include "../../gen_c_library/gen/gen_singleheader.h"
#endif