Prefix static macros
This commit is contained in:
@@ -472,7 +472,7 @@ void csource_to_string(Str8 *dst, const CSource *csource) {
|
||||
wapp_str8_alloc_concat(&arena, output, &tmp);
|
||||
}
|
||||
|
||||
Str8RO _internal = wapp_str8_lit_ro("internal ");
|
||||
Str8RO _wapp_intern = wapp_str8_lit_ro("wapp_intern ");
|
||||
for (u64 i = 0; i < csource->internal_funcs.node_count; ++i) {
|
||||
declare_cfunc(&tmp, wapp_cfunc_list_get(&(csource->internal_funcs), i)->item);
|
||||
wapp_str8_alloc_concat(&arena, output, &_internal);
|
||||
|
@@ -4,14 +4,14 @@
|
||||
#include "wapp_core.h"
|
||||
#include <stddef.h>
|
||||
|
||||
internal CEnumValList cenumval_node_to_list(CEnumValNode *node);
|
||||
internal CArgList carg_node_to_list(CArgNode *node);
|
||||
internal CQualifierList cqualifier_node_to_list(CQualifierNode *node);
|
||||
internal CIncludeList cinclude_node_to_list(CIncludeNode *node);
|
||||
internal CUserTypeList cusertype_node_to_list(CUserTypeNode *node);
|
||||
internal CFuncList cfunc_node_to_list(CFuncNode *node);
|
||||
internal CStructList cstruct_node_to_list(CStructNode *node);
|
||||
internal CMacroList cmacro_node_to_list(CMacroNode *node);
|
||||
wapp_intern CEnumValList cenumval_node_to_list(CEnumValNode *node);
|
||||
wapp_intern CArgList carg_node_to_list(CArgNode *node);
|
||||
wapp_intern CQualifierList cqualifier_node_to_list(CQualifierNode *node);
|
||||
wapp_intern CIncludeList cinclude_node_to_list(CIncludeNode *node);
|
||||
wapp_intern CUserTypeList cusertype_node_to_list(CUserTypeNode *node);
|
||||
wapp_intern CFuncList cfunc_node_to_list(CFuncNode *node);
|
||||
wapp_intern CStructList cstruct_node_to_list(CStructNode *node);
|
||||
wapp_intern CMacroList cmacro_node_to_list(CMacroNode *node);
|
||||
|
||||
CEnumValNode *wapp_cenumval_list_get(const CEnumValList *list, u64 index) {
|
||||
wapp_runtime_assert(index < list->node_count, "`index` is out of bounds");
|
||||
@@ -1397,7 +1397,7 @@ void wapp_cmacro_list_empty(CMacroList *list) {
|
||||
}
|
||||
}
|
||||
|
||||
internal CEnumValList cenumval_node_to_list(CEnumValNode *node) {
|
||||
wapp_intern CEnumValList cenumval_node_to_list(CEnumValNode *node) {
|
||||
CEnumValList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1413,7 +1413,7 @@ internal CEnumValList cenumval_node_to_list(CEnumValNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CArgList carg_node_to_list(CArgNode *node) {
|
||||
wapp_intern CArgList carg_node_to_list(CArgNode *node) {
|
||||
CArgList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1429,7 +1429,7 @@ internal CArgList carg_node_to_list(CArgNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CQualifierList cqualifier_node_to_list(CQualifierNode *node) {
|
||||
wapp_intern CQualifierList cqualifier_node_to_list(CQualifierNode *node) {
|
||||
CQualifierList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1445,7 +1445,7 @@ internal CQualifierList cqualifier_node_to_list(CQualifierNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CIncludeList cinclude_node_to_list(CIncludeNode *node) {
|
||||
wapp_intern CIncludeList cinclude_node_to_list(CIncludeNode *node) {
|
||||
CIncludeList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1461,7 +1461,7 @@ internal CIncludeList cinclude_node_to_list(CIncludeNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CUserTypeList cusertype_node_to_list(CUserTypeNode *node) {
|
||||
wapp_intern CUserTypeList cusertype_node_to_list(CUserTypeNode *node) {
|
||||
CUserTypeList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1477,7 +1477,7 @@ internal CUserTypeList cusertype_node_to_list(CUserTypeNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CFuncList cfunc_node_to_list(CFuncNode *node) {
|
||||
wapp_intern CFuncList cfunc_node_to_list(CFuncNode *node) {
|
||||
CFuncList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1493,7 +1493,7 @@ internal CFuncList cfunc_node_to_list(CFuncNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CStructList cstruct_node_to_list(CStructNode *node) {
|
||||
wapp_intern CStructList cstruct_node_to_list(CStructNode *node) {
|
||||
CStructList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
@@ -1509,7 +1509,7 @@ internal CStructList cstruct_node_to_list(CStructNode *node) {
|
||||
return output;
|
||||
}
|
||||
|
||||
internal CMacroList cmacro_node_to_list(CMacroNode *node) {
|
||||
wapp_intern CMacroList cmacro_node_to_list(CMacroNode *node) {
|
||||
CMacroList output = {.first = node, .last = node, .node_count = 1};
|
||||
|
||||
while (output.first->prev != NULL) {
|
||||
|
@@ -28,7 +28,7 @@ typedef enum {
|
||||
|
||||
COUNT_CTYPE,
|
||||
} CType;
|
||||
internal Str8RO ctypes[COUNT_CTYPE] = {
|
||||
wapp_intern Str8RO ctypes[COUNT_CTYPE] = {
|
||||
[CTYPE_VOID] = wapp_str8_lit_ro("void"),
|
||||
[CTYPE_B32] = wapp_str8_lit_ro("b32"),
|
||||
[CTYPE_CHAR] = wapp_str8_lit_ro("char"),
|
||||
@@ -59,12 +59,12 @@ typedef enum {
|
||||
|
||||
COUNT_CQUALIFIER,
|
||||
} CQualifier;
|
||||
internal Str8RO cqualifiers[COUNT_CQUALIFIER] = {
|
||||
wapp_intern Str8RO cqualifiers[COUNT_CQUALIFIER] = {
|
||||
[CQUALIFIER_NONE] = wapp_str8_lit_ro(""),
|
||||
[CQUALIFIER_CONST] = wapp_str8_lit_ro("const "),
|
||||
[CQUALIFIER_EXTERNAL] = wapp_str8_lit_ro("external "),
|
||||
[CQUALIFIER_INTERNAL] = wapp_str8_lit_ro("internal "),
|
||||
[CQUALIFIER_PERSISTENT] = wapp_str8_lit_ro("persistent "),
|
||||
[CQUALIFIER_EXTERNAL] = wapp_str8_lit_ro("wapp_extern "),
|
||||
[CQUALIFIER_INTERNAL] = wapp_str8_lit_ro("wapp_intern "),
|
||||
[CQUALIFIER_PERSISTENT] = wapp_str8_lit_ro("wapp_persist "),
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef enum {
|
||||
|
||||
COUNT_CPOINTERTYPE,
|
||||
} CPointerType;
|
||||
internal Str8RO cpointertypes[COUNT_CPOINTERTYPE] = {
|
||||
wapp_intern Str8RO cpointertypes[COUNT_CPOINTERTYPE] = {
|
||||
[CPOINTERTYPE_NONE] = wapp_str8_lit_ro(""),
|
||||
[CPOINTERTYPE_SINGLE] = wapp_str8_lit_ro("*"),
|
||||
[CPOINTERTYPE_DOUBLE] = wapp_str8_lit_ro("**"),
|
||||
|
Reference in New Issue
Block a user