mirror of
https://github.com/Ed94/gencpp.git
synced 2025-04-17 22:45:23 -07:00
Compare commits
No commits in common. "13ebd105c44c0a4175232422e9ee36acab641aca" and "16bc66c80e72a6297d29b142a9dba2c8337f71e8" have entirely different histories.
13ebd105c4
...
16bc66c80e
@ -2045,12 +2045,9 @@ Token parse_identifier( bool* possible_member_function )
|
|||||||
Token name = currtok;
|
Token name = currtok;
|
||||||
_ctx->parser.Scope->Name = name.Text;
|
_ctx->parser.Scope->Name = name.Text;
|
||||||
|
|
||||||
Macro* macro = lookup_macro(currtok.Text);
|
|
||||||
b32 accept_as_identifier = macro && bitfield_is_set(MacroFlags, macro->Flags, MF_Allow_As_Identifier );
|
|
||||||
|
|
||||||
// Typename can be: '::' <name>
|
// Typename can be: '::' <name>
|
||||||
// If that is the case first option will be Tok_Access_StaticSymbol below
|
// If that is the case first option will be Tok_Access_StaticSymbol below
|
||||||
if (check(Tok_Identifier) || accept_as_identifier)
|
if (check(Tok_Identifier))
|
||||||
eat( Tok_Identifier );
|
eat( Tok_Identifier );
|
||||||
// <Name>
|
// <Name>
|
||||||
|
|
||||||
|
@ -25,12 +25,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif // GEN_API
|
#endif // GEN_API
|
||||||
|
|
||||||
#ifndef global // Global variables
|
#ifndef global
|
||||||
# ifdef GEN_DYN_EXPORT
|
#define global static // Global variables
|
||||||
# define global
|
|
||||||
# else
|
|
||||||
# define global static
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef internal
|
#ifndef internal
|
||||||
#define internal static // Internal linkage
|
#define internal static // Internal linkage
|
||||||
|
@ -7,19 +7,8 @@ void convert_cpp_enum_to_c( CodeEnum to_convert, CodeBody to_append )
|
|||||||
{
|
{
|
||||||
#pragma push_macro("enum_underlying")
|
#pragma push_macro("enum_underlying")
|
||||||
#undef enum_underlying
|
#undef enum_underlying
|
||||||
StrCached type;
|
StrCached type = to_convert->UnderlyingType ? to_convert->UnderlyingType.to_strbuilder().to_str() : to_convert->Name;
|
||||||
CodeTypedef tdef;
|
CodeTypedef tdef = parse_typedef(token_fmt("type", type, "name", to_convert->Name, stringize( typedef enum <type> <name>; )));
|
||||||
if (to_convert->UnderlyingType)
|
|
||||||
{
|
|
||||||
type = to_convert->UnderlyingType.to_strbuilder().to_str();
|
|
||||||
tdef = parse_typedef(token_fmt("type", type, "name", to_convert->Name, stringize( typedef <type> <name>; )));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
type = to_convert->Name;
|
|
||||||
tdef = parse_typedef(token_fmt("type", type, "name", to_convert->Name, stringize( typedef enum <type> <name>; )));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (to_convert->UnderlyingType)
|
if (to_convert->UnderlyingType)
|
||||||
{
|
{
|
||||||
to_convert->UnderlyingTypeMacro = untyped_str(token_fmt("type", to_convert->UnderlyingType->Name, stringize(enum_underlying(<type>))));
|
to_convert->UnderlyingTypeMacro = untyped_str(token_fmt("type", to_convert->UnderlyingType->Name, stringize(enum_underlying(<type>))));
|
||||||
|
@ -280,7 +280,6 @@ if ( $c_lib_dyn )
|
|||||||
$compiler_args += $flag_c11
|
$compiler_args += $flag_c11
|
||||||
$compiler_args += ( $flag_define + 'GEN_DYN_LINK' )
|
$compiler_args += ( $flag_define + 'GEN_DYN_LINK' )
|
||||||
$compiler_args += ( $flag_define + 'GEN_DYN_EXPORT' )
|
$compiler_args += ( $flag_define + 'GEN_DYN_EXPORT' )
|
||||||
$compiler_args += ( $flag_define + 'GEN_DEFINE_LIBRARY_CODE_CONSTANTS' )
|
|
||||||
|
|
||||||
$linker_args = @()
|
$linker_args = @()
|
||||||
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_dll
|
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_dll
|
||||||
|
@ -344,17 +344,15 @@ if ( $vendor -match "clang" )
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check if output is a static library
|
# Check if output is a static library
|
||||||
if ( $binary -match '\.lib$' )
|
# if ( $binary -match '\.lib$' )
|
||||||
{
|
# {
|
||||||
$lib_args = @()
|
# $lib_args = @()
|
||||||
# $lib_args += $flag_nologo
|
# $lib_args += $flag_nologo
|
||||||
# $lib_args += $flag_link_win_machine_64
|
# $lib_args += $flag_link_win_machine_64
|
||||||
# $lib_args += ( $flag_link_win_path_output + $binary )
|
# $lib_args += ( $flag_link_win_path_output + $binary )
|
||||||
# $lib_args += '--format=windows'
|
# $lib_args += $object
|
||||||
# $lib_args += '-X64'
|
# return run-archiver $archiver $binary $lib_args
|
||||||
$lib_args += $object
|
# }
|
||||||
return run-archiver $archiver $binary $lib_args
|
|
||||||
}
|
|
||||||
|
|
||||||
$linker_args += $object
|
$linker_args += $object
|
||||||
return run-linker $linker $binary $linker_args
|
return run-linker $linker $binary $linker_args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user