aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index b351bd8..e65362c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -46,6 +46,20 @@ int main(int argc, char** argv)
(int)decl.value.length, decl.value.start);
}
+ for (size_t i = 0; i < program.proc_count; i += 1)
+ {
+ struct ProcDecl proc = program.procs[i];
+ printf("proc %.*s(", (int)proc.name.length, proc.name.start);
+ for (size_t p = 0; p < proc.param_count; p += 1)
+ {
+ struct Param param = proc.params[p];
+ printf("%s%.*s: %.*s", p == 0 ? "" : ", ",
+ (int)param.name.length, param.name.start,
+ (int)param.reg.length, param.reg.start);
+ }
+ printf(")\n");
+ }
+
free_program(&program);
free_file(&source);
}