[Feat] 更新项目层级的说明 (README),且现在忽略本地测试文件test.fig

This commit is contained in:
2025-12-24 18:20:53 +08:00
parent 44165992c3
commit cec0c9ce81
3 changed files with 56 additions and 69 deletions

2
.gitignore vendored
View File

@@ -9,5 +9,3 @@ build/
.VSCodeCounter .VSCodeCounter
/test.fig /test.fig
docs/node_modules

View File

@@ -20,39 +20,33 @@
- **Clean C++ implementation** - Modern C++23 with RAII and smart pointers - **Clean C++ implementation** - Modern C++23 with RAII and smart pointers
### 📁 Project Structure ### 📁 Project Structure
Fig/ .
├── src/ ├── ExampleCodes # Example programs & performance tests
│ ├── lexer.cpp # Lexical analysis │ └── SpeedTest # Performance benchmark samples
│ ├── parser.cpp # Syntax analysis ├── LICENSE # Project license
│ ├── evaluator.cpp # Interpreter/execution engine ├── Logo # Project logo assets
│ └── value.cpp # Type system implementation ├── README.md # English README
├── include/ ├── README_ZH-CN.md # Chinese README
│ ├── argparse ├── compile_flags.txt # Compiler flags helper
│ ├── magic_enum ├── fig-vscode # VSCode extension project
├── Ast # Abstract syntax tree definitions ├── node_modules # Extension dependencies
│ ├── value.hpp # Type system header ├── out # Built extension output
│ ├── Value/ # Type system definitions ├── src # Extension source code
├── ... └── syntaxes # Syntax highlighting definition
│ ├── AstPrinter.hpp # Ast printer ├── src # Core Fig language source
│ ├── context(_forward).hpp # Environment/Context system ├── Ast # AST definitions
├── core.hpp # Core informations ├── Context # Runtime context
│ ├── error.hpp # Exception system ├── Core # Core utilities (UTF8/string/etc.)
│ ├── errorLog.hpp # Colored-Print error log ├── Error # Error handling system
│ ├── fig_string.hpp # Fig UTF-8 string ├── Evaluator # Interpreter / evaluator
│ ├── module.hpp # Package/Module system ├── Lexer # Lexical analyzer
│ ├── utils.hpp │ ├── Module # Modules and builtins
│ ├── token.hpp # Token definitions ├── Parser # Parser
│ ├── lexer.hpp # Lexical analysis ├── Token # Token definitions
│ ├── parser.hpp # Syntax analysis and AST ├── Utils # Utilities & helper headers
│ ├── evaluator.hpp # Interpreter and Control flows └── Value # Runtime type/value system
│ ├── warning.hpp # STD-Warnings ├── test.fig # Test script
├── ExampleCodes/ # Sample programs └── xmake.lua # Xmake build config
├── fig-vscode/ # vscode extension
├── .clang-format # Clang format styles
├── test.fig # Test file (dev)
├── LICENSE # Fig project license
├── xmake.lua # XMake configurations
└── Logo/ # Fig's Logo
## Language Philosophy ## Language Philosophy
Fig is designed around several core principles: Fig is designed around several core principles:

View File

@@ -20,39 +20,34 @@
- **干净的 C++ 实现** - 现代 C++23使用 RAII 和智能指针 - **干净的 C++ 实现** - 现代 C++23使用 RAII 和智能指针
### 📁 项目结构 ### 📁 项目结构
Fig/ .
├── src/ ├── ExampleCodes # 示例代码与性能测试样例
│ ├── lexer.cpp # 词法分析 └── SpeedTest # 性能相关测试示例
│ ├── parser.cpp # 语法分析 ├── LICENSE # 项目开源协议
│ ├── evaluator.cpp # 解释器/执行引擎 ├── Logo # 项目标识资源
│ └── value.cpp # 类型系统实现 ├── README.md # 英文 README
├── include/ ├── README_ZH-CN.md # 中文 README
│ ├── argparse ├── compile_flags.txt # C/C++ 编译器参数提示
│ ├── magic_enum ├── fig-vscode # VSCode 插件项目
├── Ast # 抽象语法树定义 ├── node_modules # VSCode 插件依赖
├── value.hpp # 类型系统头文件 ├── out # 构建产物
├── Value/ # 类型系统定义 ├── src # VSCode 插件源码
│ │ ├── ... │ └── syntaxes # 语法高亮定义
│ ├── AstPrinter.hpp # AST 打印器 ├── src # Fig 语言核心源码
├── context(_forward).hpp # 环境/上下文系统 ├── Ast # 抽象语法树节点
├── core.hpp # 核心信息 ├── Context # 运行上下文
├── error.hpp # 异常系统 ├── Core # 核心基础设施(字符串/UTF8 等)
├── errorLog.hpp # 彩色打印错误日志 ├── Error # 错误系统
├── fig_string.hpp # Fig UTF-8 字符串 ├── Evaluator # 解释执行器
├── module.hpp # 包/模块系统 ├── Lexer # 词法分析器
├── utils.hpp ├── Module # 模块与内置库
├── token.hpp # Token 定义 ├── Parser # 语法解析器
├── lexer.hpp # 词法分析 ├── Token # Token 定义
├── parser.hpp # 语法分析和 AST ├── Utils # 实用工具与第三方 header
│ ├── evaluator.hpp # 解释器和控制流 ── Value # 运行时类型系统与值表示
│ ├── warning.hpp # 标准警告 ├── test.fig # 测试脚本
├── ExampleCodes/ # 示例程序 └── xmake.lua # Xmake 构建脚本
├── fig-vscode/ # vscode代码插件
├── .clang-format # Clang 格式化风格
├── test.fig # 测试文件(开发用)
├── LICENSE # Fig 项目许可证
├── xmake.lua # XMake 配置
└── Logo/ # Fig 的 Logo
## 语言设计哲学 ## 语言设计哲学
Fig 围绕几个核心原则设计: Fig 围绕几个核心原则设计: