mirror of
https://github.com/Ed94/gencpp.git
synced 2025-07-01 03:11:03 -07:00
wip having nasty parser issue (fixed nasty lexer bug)
This commit is contained in:
@ -114,7 +114,7 @@ template<class Type> forceinline Type* next(Array<Type>& array, Type* entry) { r
|
||||
|
||||
template<class Type> forceinline Type* array_begin(Array<Type> array) { return array; }
|
||||
template<class Type> forceinline Type* array_end(Array<Type> array) { return array + array_get_header(array)->Num; }
|
||||
template<class Type> forceinline Type* array_next(Array<Type> array, Type* entry) { return entry + 1; }
|
||||
template<class Type> forceinline Type* array_next(Array<Type> array, Type* entry) { return ++ entry; }
|
||||
|
||||
template<class Type> inline
|
||||
Array<Type> array_init(AllocatorInfo allocator) {
|
||||
|
@ -206,7 +206,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef GEN_API_C_BEGIN
|
||||
# if GEN_COMPILER_C
|
||||
# if GEN_COMPILER_C || (GEN_COMPILER_CPP && GEN_SUPPORT_CPP_REFERENCES)
|
||||
# define GEN_API_C_BEGIN
|
||||
# define GEN_API_C_END
|
||||
# else
|
||||
|
@ -320,8 +320,10 @@ ssize arena_size_remaining(Arena* arena, ssize alignment)
|
||||
}
|
||||
#pragma endregion Arena
|
||||
|
||||
|
||||
GEN_API_C_END
|
||||
|
||||
|
||||
#pragma region FixedArena
|
||||
template<s32 Size>
|
||||
struct FixedArena;
|
||||
@ -384,8 +386,10 @@ using Arena_2MB = FixedArena< megabytes( 2 ) >;
|
||||
using Arena_4MB = FixedArena< megabytes( 4 ) >;
|
||||
#pragma endregion FixedArena
|
||||
|
||||
|
||||
GEN_API_C_BEGIN
|
||||
|
||||
|
||||
#pragma region Pool
|
||||
struct Pool_Def;
|
||||
typedef struct Pool_Def Pool;
|
||||
|
@ -49,13 +49,14 @@ forceinline char const* strc_end (StrC str) { return str.Ptr
|
||||
forceinline char const* strc_next (StrC str, char const* iter) { return iter + 1; }
|
||||
GEN_API_C_END
|
||||
|
||||
#if GEN_COMPILER_CPP && 0
|
||||
#if GEN_COMPILER_CPP
|
||||
forceinline char const* begin(StrC str) { return str.Ptr; }
|
||||
forceinline char const* end (StrC str) { return str.Ptr + str.Len; }
|
||||
forceinline char const* next (StrC str, char const* iter) { return iter + 1; }
|
||||
#endif
|
||||
|
||||
GEN_API_C_BEGIN
|
||||
|
||||
inline
|
||||
bool strc_are_equal(StrC lhs, StrC rhs)
|
||||
{
|
||||
@ -119,6 +120,7 @@ struct String;
|
||||
#endif
|
||||
|
||||
GEN_API_C_BEGIN
|
||||
|
||||
forceinline usize string_grow_formula(usize value);
|
||||
|
||||
String string_make_c_str (AllocatorInfo allocator, char const* str);
|
||||
@ -155,6 +157,7 @@ StrC string_to_strc (String str);
|
||||
void string_trim (String str, char const* cut_set);
|
||||
void string_trim_space (String str);
|
||||
String string_visualize_whitespace(String const str);
|
||||
|
||||
GEN_API_C_END
|
||||
|
||||
struct StringHeader {
|
||||
|
Reference in New Issue
Block a user