aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-23 21:35:49 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-23 21:35:49 +0200
commit17ef13f81050eb7086bd80e00a82c4c2cb6a3c9b (patch)
tree92a1d13e9c0d82bacc159e18946430e1725e7dc1
parentc734982eb5bb36e8d71c403ebebeab60e8b12480 (diff)
Rename symtab to symtab_t
-rw-r--r--src/analyzer.c6
-rw-r--r--src/analyzer.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/analyzer.c b/src/analyzer.c
index ce5087a..c1f7e05 100644
--- a/src/analyzer.c
+++ b/src/analyzer.c
@@ -98,7 +98,7 @@ static bool returns(ast_t, idx_t);
/* Index the symbol table M with the key SV, returning a pointer to the
value. If no entry exists and A is non-null, a pointer to a newly
allocated (and zeroed) value is returned, NULL otherwise. */
-static idx_t *symtab_insert(symtab **m, strview_t sv, arena_t *a)
+static idx_t *symtab_insert(symtab_t **m, strview_t sv, arena_t *a)
__attribute__((nonnull(1)));
/* Defined in primitives.gperf */
@@ -515,7 +515,7 @@ typecompat(type_t lhs, type_t rhs)
}
idx_t *
-symtab_insert(symtab **m, strview_t k, arena_t *a)
+symtab_insert(symtab_t **m, strview_t k, arena_t *a)
{
for (uint64_t h = strview_hash(k); *m; h <<= 2) {
if (strview_eq(k, (*m)->key))
@@ -524,7 +524,7 @@ symtab_insert(symtab **m, strview_t k, arena_t *a)
}
if (a == NULL)
return NULL;
- *m = arena_new(a, symtab, 1);
+ *m = arena_new(a, symtab_t, 1);
(*m)->key = k;
(*m)->val = AST_EMPTY;
return &(*m)->val;
diff --git a/src/analyzer.h b/src/analyzer.h
index d251117..2173694 100644
--- a/src/analyzer.h
+++ b/src/analyzer.h
@@ -31,11 +31,11 @@ enum {
static_assert(_TYPE_LAST_ENT - 1 <= UINT8_MAX,
"Too many AST tokens to fix in uint8_t");
-typedef struct symtab symtab;
+typedef struct symtab symtab_t;
typedef struct {
idx_t up, i;
- symtab *map;
+ symtab_t *map;
} scope_t;
/* A variable type */