cool stuff

This commit is contained in:
2026-06-15 20:27:50 +10:00
parent 284b08b12a
commit 80140ed798
41 changed files with 470 additions and 4 deletions

BIN
test/test Executable file

Binary file not shown.

15
test/test.c Normal file
View File

@@ -0,0 +1,15 @@
#include <ground.h>
int main() {
GroundProgram program = Ground.New.Program();
printf(Ground.Flags.error ? "true\n" : "false\n");
GroundState state = {NULL, NULL, NULL};
GroundInstruction instruction = Ground.New.Instruction(GroundInstruction_ADD);
printf(Ground.Flags.error ? "true\n" : "false\n");
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
printf(Ground.Flags.error ? "true\n" : "false\n");
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
printf(Ground.Flags.error ? "true\n" : "false\n");
Ground.Program.execute(&program, &state);
printf(Ground.Flags.error ? "true\n" : "false\n");
}