mirror of https://gitlab.com/nakst/essence
header generator: fix bitsets in odin 3
This commit is contained in:
parent
e2c8dc3783
commit
7444967ece
|
@ -922,6 +922,7 @@ void OutputOdinFunction(Entry *entry, Entry *root) {
|
||||||
// FilePrintFormat(stderr, "initial value: %s\n", variable->variable.initialValue);
|
// FilePrintFormat(stderr, "initial value: %s\n", variable->variable.initialValue);
|
||||||
|
|
||||||
const char *initialValue = TrimPrefix(variable->variable.initialValue);
|
const char *initialValue = TrimPrefix(variable->variable.initialValue);
|
||||||
|
bool needLeadingDot = false;
|
||||||
|
|
||||||
if (0 == strcmp(initialValue, "NULL")) {
|
if (0 == strcmp(initialValue, "NULL")) {
|
||||||
initialValue = "nil";
|
initialValue = "nil";
|
||||||
|
@ -929,10 +930,7 @@ void OutputOdinFunction(Entry *entry, Entry *root) {
|
||||||
initialValue = "\"\"";
|
initialValue = "\"\"";
|
||||||
} else if (0 == strcmp(initialValue, "FLAGS_DEFAULT")) {
|
} else if (0 == strcmp(initialValue, "FLAGS_DEFAULT")) {
|
||||||
initialValue = "{}";
|
initialValue = "{}";
|
||||||
}
|
} else {
|
||||||
|
|
||||||
bool needLeadingDot = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < arrlen(root->children); i++) {
|
for (int i = 0; i < arrlen(root->children); i++) {
|
||||||
Entry *entry = root->children + i;
|
Entry *entry = root->children + i;
|
||||||
|
|
||||||
|
@ -954,6 +952,7 @@ void OutputOdinFunction(Entry *entry, Entry *root) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FilePrintFormat(output, " = %c%s", needLeadingDot ? '.' : ' ', initialValue);
|
FilePrintFormat(output, " = %c%s", needLeadingDot ? '.' : ' ', initialValue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue