Oh boy do I love formatting.

This commit is contained in:
Jacob Signorovitch 2025-03-26 18:16:13 -04:00
parent d699f492fa
commit f8ee7cc66e
6 changed files with 13 additions and 18 deletions

View File

@ -196,4 +196,3 @@ exp:
$$ = ast_init(AST_TYPE_CALL, ast_call_data_init(to, 2, argv)); $$ = ast_init(AST_TYPE_CALL, ast_call_data_init(to, 2, argv));
} }
%% %%

View File

@ -1,11 +1,10 @@
#include "include/htab.h" #include "include/htab.h"
#include "include/fnv1a.h" #include "include/fnv1a.h"
#include "include/util.h" #include "include/util.h"
#include "include/util.h"
#include <assert.h> #include <assert.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
HTab* htab_init() { HTab* htab_init() {
HTab* htab = calloc(1, sizeof(HTab)); HTab* htab = calloc(1, sizeof(HTab));
@ -13,9 +12,7 @@ HTab* htab_init() {
return htab; return htab;
} }
void htab_destroy(HTab *htab) { void htab_destroy(HTab* htab) { free(htab); }
free(htab);
}
// Get the index of a key. // Get the index of a key.
size_t geti(char* key) { size_t geti(char* key) {

View File

@ -21,8 +21,6 @@ static AST* (*builtin_fns[NBUILTIN_FNS])(size_t argc, AST** argv) = {
builtin_sum, builtin_sub, builtin_mul, builtin_div builtin_sum, builtin_sub, builtin_mul, builtin_div
}; };
static char* builtin_fns_names[NBUILTIN_FNS] = { static char* builtin_fns_names[NBUILTIN_FNS] = {"sum", "sub", "mul", "div"};
"sum", "sub", "mul", "div"
};
#endif #endif

View File

@ -5,7 +5,8 @@
#include <stdint.h> #include <stdint.h>
#define HTAB_FN fnv1a_hash // Function used for hashing. #define HTAB_FN fnv1a_hash // Function used for hashing.
#define HTAB_SPACE 1024 // Number of entries possible in the hash table; must be #define HTAB_SPACE \
1024 // Number of entries possible in the hash table; must be
// power of 2. // power of 2.
// Hash Table. // Hash Table.