code / tomo

Lines41.3K C23.7K Markdown9.7K YAML5.0K Tomo2.3K
7 others 763
Python231 Shell230 make212 INI47 Text21 SVG16 Lua6
(34 lines)

Source Files

This directory contains the source files for actual cross-compilation (transpilation) from AST to C code:

1 # Source Files
3 This directory contains the source files for actual cross-compilation
4 (transpilation) from AST to C code:
6 - Assert statements (`assert x > 1`): [assertions.c](assertions.c)
7 - Variable assignment (`x = val`): [assignments.c](assignments.c)
8 - Binary operations (`1 + 2`, etc.): [binops.c](binops.c)
9 - Code blocks: [blocks.c](blocks.c)
10 - Command line interface parsing: [cli.c](cli.c)
11 - Comparisons (`a == b`, `a > b`, etc): [comparisons.c](comparisons.c)
12 - Conditionals (`if` statements): [conditionals.c](conditionals.c)
13 - Variable declarations: [declarations.c](declarations.c)
14 - Debug logs (`>> expr`): [debuglog.c](debuglog.c)
15 - Enums (`enum`): [enums.c](enums.c)
16 - General logic for compiling expressions: [expressions.c](expressions.c)
17 - Field accesses (`foo.baz`) [fieldaccess.c](fieldaccess.c)
18 - Compilation of entire files: [files.c](files.c)
19 - Functions, lambdas, and function calls (`func`): [functions.c](functions.c)
20 - Compilation of C headers: [headers.c](headers.c)
21 - Indexing (`foo[x]` and `ptr[]`): [indexing.c](indexing.c)
22 - Integers: [integers.c](integers.c)
23 - Lists (`[1, 2, 3]`): [lists.c](lists.c)
24 - Loops (`for`, `repeat`, `while`, `skip`, `stop`): [loops.c](loops.c)
25 - Optional values and `none`: [optionals.c](optionals.c)
26 - Pointers (`@` and `&`): [pointers.c](pointers.c)
27 - Type promotions of values: [promotions.c](promotions.c)
28 - Reductions (`(+: nums)`): [reductions.c](reductions.c)
29 - General logic for compiling statements: [statements.c](statements.c)
30 - Structs (`struct`): [structs.c](structs.c)
31 - Tables (`{1=10, 2=20}`): [tables.c](tables.c)
32 - Text: [text.c](text.c)
33 - Types and type metadata: [types.c](types.c)
34 - Pattern matching (`when x is ...`): [whens.c](whens.c)