[obsidian] vault backup: 2026-02-02 22:21:12[
Some checks failed
Build / build (push) Failing after 22m53s
Some checks failed
Build / build (push) Failing after 22m53s
This commit is contained in:
26
content/モジュールの名前環境解決を考慮した評価文脈.md
Normal file
26
content/モジュールの名前環境解決を考慮した評価文脈.md
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
何度目だという[[評価環境]]の実装。
|
||||
|
||||
モジュールも考慮して、名前空間のOpenとかも含めた評価環境を実装したい。
|
||||
|
||||
名前の側で正規化するのがいいのか?
|
||||
|
||||
```rust
|
||||
//Environment全体をSlotMapで管理する
|
||||
struct Environment<V>{
|
||||
namespace:Option<Symbol>
|
||||
parent: Option<EnvKey>
|
||||
children: Vec<EnvKey>
|
||||
binds: Vec<(Symbol,V)>
|
||||
}
|
||||
```
|
||||
|
||||
letでスコープを広げたときはnamespaceなしで辿ることにする
|
||||
|
||||
最終的にはLanguage ServerでSpanからEnvironment
|
||||
|
||||
```rust
|
||||
fn get_normalized_name()
|
||||
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user