Initial commit

This commit is contained in:
2025-09-30 21:29:06 +10:00
commit 39735ed696
41 changed files with 1692 additions and 0 deletions

21
src/repl/repl.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "repl.h"
#include "../executor/executor.h"
#include "../parser/parser.h"
#include "../defs/defs.h"
#include <iostream>
#include <string>
void repl() {
inReplMode = true;
std::cout << "Kyn REPL v0.0.1" << std::endl;
std::cout << "Type 'exit' to exit" << std::endl;
std::string buf;
while (true) {
std::cout << "kyn> ";
getline(std::cin, buf);
std::vector<Instruction> parsed = parse(buf);
for (Instruction inst : parsed) {
execute(inst);
}
}
}

1
src/repl/repl.h Normal file
View File

@@ -0,0 +1 @@
void repl();