summaryrefslogtreecommitdiff
path: root/vm.h
blob: 3db064b0fed7a77bf3ac4292af65951c4ec5dabb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include <stdint.h>

typedef struct {
  uint8_t *ip;
} VM;

typedef struct {
} Chunk;

typedef enum {
  INTERPRET_OK,
  INTERPRET_COMPILE_ERROR,
  INTERPRET_RUNTIME_ERROR
} InterpretResult;

void initVM();
void freeVM();
InterpretResult interpret(Chunk* chunk);