建立四模块 CMake 骨架与 line1 样例。
- compiler / vm 空静态库,host 可执行打印版本 - 顶层解开 add_subdirectory,tests 接入 CTest(host_version 通过) - examples/line1 落地 project.toml 与三个 .st - Types.h 注释补饱和规则,与 Doc/isa 一致 - .gitignore 忽略 Doc/会话记录.md
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# CMake最低版本
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
|
||||
# 工程名、版本号、工程描述
|
||||
project(Compiler
|
||||
VERSION 0.1
|
||||
DESCRIPTION "ST / toml 编译器")
|
||||
|
||||
include_directories(./include)
|
||||
|
||||
# 词法、语法、符号表、类型检查、codegen、链接都留在 compiler 一个库里
|
||||
add_library(compiler STATIC
|
||||
./src/Lexer.cpp)
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @file Lexer.cpp
|
||||
* @brief 词法分析(12.4 实现)
|
||||
* @date 2026-08-19
|
||||
*/
|
||||
|
||||
namespace compiler {
|
||||
}
|
||||
Reference in New Issue
Block a user