Commit graph

6 commits

Author SHA1 Message Date
Leonardo de Moura
58d51bc764 feat: add FieldInfo 2021-01-15 15:01:45 -08:00
Wojciech Nawrocki
310a2ab6a3 feat: minimal hovers MVP 2021-01-15 13:29:22 -08:00
Leonardo de Moura
ae60360d7a feat: add resolveName' which produces Syntax with position information for each field 2021-01-15 11:19:01 -08:00
Leonardo de Moura
25c9727a92 feat: add TermInfo for LVal
@Vtec234 Added the missing info.
Given
```lean
def f3 (s : Nat × Array (Array Nat)) : Array Nat :=
  s.2[1].push s.1
```
We produce the following `InfoTree` for the body (originally at line 30)
```
Array.push (Array.getOp s.snd 1) s.fst : Array Nat @ ⟨30, 2⟩-⟨30, 17⟩
  s : Nat × Array (Array Nat) @ ⟨30, 2⟩-⟨30, 3⟩
  Prod.snd : {α β : Type} → α × β → β @ ⟨30, 4⟩-⟨30, 5⟩
  Array.getOp : {α : Type} → [inst : Inhabited α] → Array α → Nat → α @ ⟨30, 5⟩-⟨30, 6⟩
  1 : Nat @ ⟨30, 6⟩-⟨30, 7⟩
  Array.push : {α : Type} → Array α → α → Array α @ ⟨30, 9⟩-⟨30, 13⟩
  s.fst : Nat @ ⟨30, 14⟩-⟨30, 17⟩
    s : Nat × Array (Array Nat) @ ⟨30, 14⟩-⟨30, 15⟩
    Prod.fst : {α β : Type} → α × β → α @ ⟨30, 16⟩-⟨30, 17⟩
```
2021-01-14 12:19:21 -08:00
Leonardo de Moura
fb52ec8ef5 feat: store binder information in the InfoTree
@Vtec234 I am storing the binder information using `TermInfo`.
If it helps, I can add a custom `Info` constructor.
Example: `| Info.ofBinderInfo (i : BinderInfo)`.
2021-01-14 12:19:21 -08:00
Leonardo de Moura
873634be7e feat: hierarchical InfoTree 2021-01-09 14:10:11 -08:00