From 90f07a5601bc8302b85cf499866504d5cfe970a5 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Sun, 29 Dec 2024 12:20:11 +0100 Subject: [PATCH] Cleanup --- armorcore/tools/amake/alang.md | 43 ---------------------------------- armorcore/tools/amake/alang.ts | 2 -- armorcore/tools/amake/main.c | 3 --- 3 files changed, 48 deletions(-) delete mode 100644 armorcore/tools/amake/alang.md diff --git a/armorcore/tools/amake/alang.md b/armorcore/tools/amake/alang.md deleted file mode 100644 index e09c99ea..00000000 --- a/armorcore/tools/amake/alang.md +++ /dev/null @@ -1,43 +0,0 @@ -# alang - -alang is a TypeScript to C transpiler. A small subset of TypeScript is supported which maps well with C in order to achieve the best performance. - -```ts -// TS -type point_t = { - x: f32; - y: f32; -}; - -function add(a: point_t, b: point_t) { - a.x += b.x; - a.y += b.y; -} - -function main() { - let a: point_t = { x: 1.0, y: 2.0 }; - let b: point_t = { x: 3.0, y: 4.0 }; - add(a, b); -} -``` - -```c -// C -#include - -typedef struct point { - f32 x; - f32 y; -} point_t; - -void add(point_t *a, point_t *b) { - a->x += b->x; - a->y += b->y; -} - -void main() { - point_t *a = GC_ALLOC_INIT(point_t, { x: 1.0, y: 2.0 }); - point_t *b = GC_ALLOC_INIT(point_t, { x: 3.0, y: 4.0 }); - add(a, b); -} -``` diff --git a/armorcore/tools/amake/alang.ts b/armorcore/tools/amake/alang.ts index 357a7ac7..3dc3ff35 100644 --- a/armorcore/tools/amake/alang.ts +++ b/armorcore/tools/amake/alang.ts @@ -1,6 +1,4 @@ -// ../../make --graphics opengl --compile --alangjs - ///include let alang_output: string = null; diff --git a/armorcore/tools/amake/main.c b/armorcore/tools/amake/main.c index 82a3d135..4ff02c46 100644 --- a/armorcore/tools/amake/main.c +++ b/armorcore/tools/amake/main.c @@ -1,7 +1,4 @@ -// ../../make --compile --alangjs --ccompiler gcc --cppcompiler g++ -// (gcc has lto enabled) - #include #include #include