start working on text representation and constants

This commit is contained in:
2026-08-03 21:01:34 +10:00
parent b4cb3aa56e
commit 15709b65a6
19 changed files with 457 additions and 18 deletions

View File

@@ -5,13 +5,19 @@
#include <stddef.h>
typedef enum {
GravityOpcodeAdd = 0
GravityOpcodeAlloc = 0,
GravityOpcodeStore,
GravityOpcodeLoad
} GravityOpcode;
typedef struct {
GravityOpcode opcode;
GravityValue* operands;
size_t numOperands;
GravityValue result;
} GravityInstruction;
char* gravityInstructionToCStr(GravityInstruction inst);
char* gravityOpcodeToCStr(GravityOpcode opcode);
#endif