aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-18 12:49:38 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-03-18 12:49:38 -0400
commitced54c291906ae84fc5d51fd8140818139965277 (patch)
treef65afe9052c2beb591352f4573a7220e7cc0356b
parentdf2e01c15e0ff44aaf60589095aba75669b110d7 (diff)
More file comments
-rw-r--r--ast.h3
-rw-r--r--compile.h2
-rw-r--r--enums.h3
-rw-r--r--environment.h2
-rw-r--r--parse.h4
-rw-r--r--structs.h2
-rw-r--r--typecheck.h3
-rw-r--r--types.h3
8 files changed, 22 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index 4807c7b6..45a192ad 100644
--- a/ast.h
+++ b/ast.h
@@ -1,4 +1,7 @@
#pragma once
+
+// Logic defining ASTs (abstract syntax trees) to represent code
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/compile.h b/compile.h
index e5c2809a..49e41fbc 100644
--- a/compile.h
+++ b/compile.h
@@ -1,5 +1,7 @@
#pragma once
+// Compilation functions
+
#include <gc/cord.h>
#include <gc.h>
#include <stdio.h>
diff --git a/enums.h b/enums.h
index 15158ff4..c8a675e7 100644
--- a/enums.h
+++ b/enums.h
@@ -1,4 +1,7 @@
#pragma once
+
+// Compilation of tagged unions (enums)
+
#include <gc/cord.h>
#include "ast.h"
diff --git a/environment.h b/environment.h
index c5acb57d..dc94df23 100644
--- a/environment.h
+++ b/environment.h
@@ -1,5 +1,7 @@
#pragma once
+// Compilation environments
+
#include <gc/cord.h>
#include "types.h"
diff --git a/parse.h b/parse.h
index 53558c8d..9dae2c74 100644
--- a/parse.h
+++ b/parse.h
@@ -1,5 +1,7 @@
#pragma once
+// Parsing logic
+
#include <setjmp.h>
#include "ast.h"
@@ -7,3 +9,5 @@
type_ast_t *parse_type_str(const char *str);
ast_t *parse_expression_str(const char *str);
ast_t *parse_file(file_t *file, jmp_buf *on_err);
+
+// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0
diff --git a/structs.h b/structs.h
index e837f284..9a17f314 100644
--- a/structs.h
+++ b/structs.h
@@ -1,5 +1,7 @@
#pragma once
+// Compilation of user-defined structs
+
#include "ast.h"
#include "environment.h"
diff --git a/typecheck.h b/typecheck.h
index b2f27c38..0468956e 100644
--- a/typecheck.h
+++ b/typecheck.h
@@ -1,4 +1,7 @@
#pragma once
+
+// Type-checking functions
+
#include <gc.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/types.h b/types.h
index ce90061c..d502b726 100644
--- a/types.h
+++ b/types.h
@@ -1,4 +1,7 @@
#pragma once
+
+// Logic for defining and working with types
+
#include <printf.h>
#include <stdlib.h>