[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

4
.gitignore vendored
View File

@@ -8,6 +8,4 @@ build/
.vscode
.VSCodeCounter
/test.fig
docs/node_modules
/test.fig

View File

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

View File

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