diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 23:18:56 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 23:18:56 +0000 |
| commit | 7f7be8a8202b9ccea19ae379665e3a34a81b6797 (patch) | |
| tree | cca7fdae365a7240a883cc9ebf0e5090c4311320 /src | |
| parent | 70144b6829c3ca8ff8b46e40b358cc711db85efb (diff) | |
Improved examples in 'examples/'
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen/codegen_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen/codegen_utils.c b/src/codegen/codegen_utils.c index 8de3cf6..391ebd3 100644 --- a/src/codegen/codegen_utils.c +++ b/src/codegen/codegen_utils.c @@ -411,6 +411,10 @@ char *infer_type(ParserContext *ctx, ASTNode *node) char *inner = infer_type(ctx, node->unary.operand); if (inner) { + if (strcmp(inner, "string") == 0) + { + return xstrdup("char"); + } char *ptr = strchr(inner, '*'); if (ptr) { |
