From 5aa4efede78c1a79b8f5a87641082c596ae4ac64 Mon Sep 17 00:00:00 2001 From: zekexiao Date: Thu, 22 Jan 2026 20:56:02 +0800 Subject: [PATCH] Rename files --- CMakeLists.txt | 3 +- cli/main.cpp | 38 +- src/camellya.cpp | 168 +++++++ src/camellya.h | 71 ++- src/compiler.cpp | 1086 +++++++++++++++++++++--------------------- src/compiler.h | 144 +++--- src/interpreter.cpp | 567 ---------------------- src/interpreter.h | 151 ------ src/state.cpp | 146 ------ src/state.h | 68 --- tests/test_basic.cpp | 16 +- tests/test_vm.cpp | 18 +- 12 files changed, 872 insertions(+), 1604 deletions(-) create mode 100644 src/camellya.cpp delete mode 100644 src/interpreter.cpp delete mode 100644 src/interpreter.h delete mode 100644 src/state.cpp delete mode 100644 src/state.h diff --git a/CMakeLists.txt b/CMakeLists.txt index bac6e38..1c7176f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,10 +10,10 @@ option(CAMELLYA_BUILD_CLI "Build command line interface" ON) # Library sources set(LIB_SOURCES + src/camellya.cpp src/lexer.cpp src/parser.cpp src/value.cpp - src/state.cpp src/chunk.cpp src/compiler.cpp src/vm.cpp @@ -26,7 +26,6 @@ set(LIB_HEADERS src/parser.h src/ast.h src/value.h - src/state.h src/chunk.h src/compiler.h src/vm.h diff --git a/cli/main.cpp b/cli/main.cpp index 0ca8a2c..9405dd0 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -1,22 +1,26 @@ #include "camellya.h" -#include -#include #include +#include +#include -int main(int argc, char** argv) { - if(argc < 2){ - std::cout << std::format("Usage: chun