aboutsummaryrefslogtreecommitdiff
path: root/src/compile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-25 00:01:56 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-25 00:01:56 -0400
commitb1d2120d5d20c0122cc0a61f2ca09f0bc754d14d (patch)
treea9e978b3bf6aa371a8591317ff2fd2450e9c1e21 /src/compile
parentf5b2281084d31700690916c6dd250e2da927e566 (diff)
More docs and moving parsing into a subfolder.
Diffstat (limited to 'src/compile')
-rw-r--r--src/compile/README.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/compile/README.md b/src/compile/README.md
new file mode 100644
index 00000000..2d26249d
--- /dev/null
+++ b/src/compile/README.md
@@ -0,0 +1,35 @@
+# Source Files
+
+This directory contains the source files for actual cross-compilation
+(transpilation) from AST to C code:
+
+- Assert statements (`assert x > 1`): [assertions.c](assertions.c)
+- Variable assignment (`x = val`): [assignments.c](assignments.c)
+- Binary operations (`1 + 2`, etc.): [binops.c](binops.c)
+- Code blocks: [blocks.c](blocks.c)
+- Command line interface parsing: [cli.c](cli.c)
+- Comparisons (`a == b`, `a > b`, etc): [comparisons.c](comparisons.c)
+- Conditionals (`if` statements): [conditionals.c](conditionals.c)
+- Variable declarations: [declarations.c](declarations.c)
+- Doctests (`>> test`): [doctests.c](doctests.c)
+- Enums (`enum`): [enums.c](enums.c)
+- General logic for compiling expressions: [expressions.c](expressions.c)
+- Field accesses (`foo.baz`) [fieldaccess.c](fieldaccess.c)
+- Compilation of entire files: [files.c](files.c)
+- Functions, lambdas, and function calls (`func`): [functions.c](functions.c)
+- Compilation of C headers: [headers.c](headers.c)
+- Indexing (`foo[x]` and `ptr[]`): [indexing.c](indexing.c)
+- Integers: [integers.c](integers.c)
+- Lists (`[1, 2, 3]`): [lists.c](lists.c)
+- Loops (`for`, `repeat`, `while`, `skip`, `stop`): [loops.c](loops.c)
+- Optional values and `none`: [optionals.c](optionals.c)
+- Pointers (`@` and `&`): [pointers.c](pointers.c)
+- Type promotions of values: [promotions.c](promotions.c)
+- Reductions (`(+: nums)`): [reductions.c](reductions.c)
+- Sets (`|1, 2, 3|`): [sets.c](sets.c)
+- General logic for compiling statements: [statements.c](statements.c)
+- Structs (`struct`): [structs.c](structs.c)
+- Tables (`{1=10, 2=20}`): [tables.c](tables.c)
+- Text: [text.c](text.c)
+- Types and type metadata: [types.c](types.c)
+- Pattern matching (`when x is ...`): [whens.c](whens.c)