feat: graph (WIP)

This commit is contained in:
2025-08-15 12:38:11 +08:00
parent d8ad7fe904
commit 3c7722a3d2
7 changed files with 78 additions and 30 deletions

24
TODO.md
View File

@@ -2,4 +2,26 @@
- [ ] resolve stage
- [ ] dynamic attr resolution
- [ ] import resolution
- [ ] path resolution
- [ ] static path resolution
- [ ] eval stage
- [ ] dynamic path resolution
- [ ] graph update
- [ ] stack storage
阻拦变量解析的是 `with import` 而不是一般的 `with`
解析阶段可以解决除涉及非字符串常量拼接路径导入之外的问题
# 工作流程
```mermaid
flowchart TD
Start --> CtxNew[Context::new]
CtxNew --> CtxEval[Context::eval]
CtxEval --> DCtxNew[DowngradeCtx::new]
DCtxNew --> DCtxDowngradeRoot[DowngradeCtx::downgrade_root]
DCtxDowngradeRoot --> RCtxNew[ResolveCtx::new]
RCtxNew --> RCtxResolveRoot[ResolveCtx::resolve_root]
RCtxResolveRoot --> ECtxNew[EvalCtx::new]
ECtxNew --> ECtxEvalRoot[EvalCtx::eval_root]
ECtxEvalRoot --> ECtxEvalDeps[EvalCtx::eval_deps]
ECtxEvalDeps --> ECtxEval[EvalCtx::eval]
```