Skip to content

Commit a42673d

Browse files
committed
feat: implement core VM, REPL, file execution, and compiler pipeline setup.
1 parent f1b2830 commit a42673d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

include/compiler.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
#include "vm.h"
66

77

8-
typedef struct {
9-
Token current;
10-
Token previous;
11-
bool hadError;
12-
bool panicMode;
13-
Scanner *scanner;
14-
} Parser;
8+
#include "parser.h"
159

1610
typedef enum {
1711
PREC_NONE,

src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <string.h>
1616

1717

18+
void registerStdLib(VM* vm);
19+
1820
static void repl(VM *vm) {
1921
char line[1024];
2022

src/runtime/vm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "debug.h"
55
#include "vm.h"
66

7+
static void freeObjects(VM* vm);
8+
79
void initVM(VM *vm) { vm->stackTop = vm->stack; }
810

911
void freeVM(VM *vm) {

0 commit comments

Comments
 (0)