diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-27 16:09:35 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-27 16:09:35 +0100 |
| commit | a96141a3ea9d1b11ef4cdc924216d8979689e6f0 (patch) | |
| tree | 0192bdd4e63f3fb3c9172faae35bf8b08c8c957d /src/syntax | |
| parent | 2e039cb052fcb768027053cbf02ce396f6d7a6be (diff) | |
Autocomplete methods
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/node.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/syntax/node.rs b/src/syntax/node.rs index d133fc5d..a0fa5e1e 100644 --- a/src/syntax/node.rs +++ b/src/syntax/node.rs @@ -150,6 +150,7 @@ impl SyntaxNode { } /// Convert the child to another kind. + #[track_caller] pub(super) fn convert_to_kind(&mut self, kind: SyntaxKind) { debug_assert!(!kind.is_error()); match &mut self.0 { @@ -295,6 +296,7 @@ struct LeafNode { impl LeafNode { /// Create a new leaf node. + #[track_caller] fn new(kind: SyntaxKind, text: impl Into<EcoString>) -> Self { debug_assert!(!kind.is_error()); Self { kind, text: text.into(), span: Span::detached() } @@ -340,6 +342,7 @@ struct InnerNode { impl InnerNode { /// Create a new inner node with the given kind and children. + #[track_caller] fn new(kind: SyntaxKind, children: Vec<SyntaxNode>) -> Self { debug_assert!(!kind.is_error()); |
