diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-02-21 09:38:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 08:38:47 +0000 |
| commit | be49935753f0e37ae8e04fb53111e6f116c63f47 (patch) | |
| tree | 0fbc875af61bdedb0d0de42b8809bdb4aae8586f /crates/typst-ide | |
| parent | b2e509d472634fd5dd43514dbde24eedab566abd (diff) | |
Destructuring improvements (#3463)
Diffstat (limited to 'crates/typst-ide')
| -rw-r--r-- | crates/typst-ide/src/complete.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-ide/src/complete.rs b/crates/typst-ide/src/complete.rs index 8acf1540..b58a9bcc 100644 --- a/crates/typst-ide/src/complete.rs +++ b/crates/typst-ide/src/complete.rs @@ -1285,7 +1285,7 @@ impl<'a> CompletionContext<'a> { let mut sibling = Some(node.clone()); while let Some(node) = &sibling { if let Some(v) = node.cast::<ast::LetBinding>() { - for ident in v.kind().idents() { + for ident in v.kind().bindings() { defined.insert(ident.get().clone()); } } @@ -1323,7 +1323,7 @@ impl<'a> CompletionContext<'a> { if let Some(v) = parent.cast::<ast::ForLoop>() { if node.prev_sibling_kind() != Some(SyntaxKind::In) { let pattern = v.pattern(); - for ident in pattern.idents() { + for ident in pattern.bindings() { defined.insert(ident.get().clone()); } } |
