aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-08-30 00:01:15 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-08-30 00:01:15 +0300
commit20ce6fa81cd9f55dca3212699d5949f8ebe7d95b (patch)
treefdb89a8b290668ef61cc4747ac5236b817fdd686 /src
parent9a31a10d18ff5de50b4532a7f461ec97c5880d11 (diff)
downloadngc-20ce6fa81cd9f55dca3212699d5949f8ebe7d95b.tar.gz
ngc-20ce6fa81cd9f55dca3212699d5949f8ebe7d95b.zip
add hashmap example
+ Doesn't quite work yet because <type> expansion isn't implemented yet
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 917a68c..38102fb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -552,6 +552,8 @@ static char *replace(char *body, char *replace, char *id)
idx += len;
continue;
}
+
+ new = append(new, body[idx++]);
}
free(body);
@@ -741,7 +743,7 @@ static void expand_instance(char *id, char *instance)
super = replace_id(super, name, type);
if (args)
- args = replace_id(super, name, type);
+ args = replace_id(args, name, type);
}
drop_tokens(&type_traits);