[obsidian] vault backup: 2026-02-02 23:23:19[
All checks were successful
Build / build (push) Successful in 22m38s
All checks were successful
Build / build (push) Successful in 22m38s
This commit is contained in:
@@ -10,17 +10,25 @@
|
|||||||
struct Environment<V>{
|
struct Environment<V>{
|
||||||
namespace:Option<Symbol>
|
namespace:Option<Symbol>
|
||||||
parent: Option<EnvKey>
|
parent: Option<EnvKey>
|
||||||
children: Vec<EnvKey>
|
children: Vec<EnvKey>,
|
||||||
|
span:Range<u64>,
|
||||||
binds: Vec<(Symbol,V)>
|
binds: Vec<(Symbol,V)>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
letでスコープを広げたときはnamespaceなしで辿ることにする
|
letでスコープを広げたときはnamespaceなしで辿ることにする
|
||||||
|
|
||||||
最終的にはLanguage ServerでSpanからEnvironment
|
最終的にはLanguage ServerでSpanからEnvironmentの位置を補足したいということになる。
|
||||||
|
|
||||||
|
基本的に、子環境のEnvironmentは常に親のEncより狭い範囲のSpanを持つはず。そして子要素同士のSpanは交差しないはず。
|
||||||
|
|
||||||
|
親から子要素を二分探索で辿って行って(Spanは交差しないからPartialOrdにできるはず)
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
fn get_normalized_name()
|
fn get_completions(arena:SlotMap<_>,root_env:EnvKey,span:Span){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user