From a96141a3ea9d1b11ef4cdc924216d8979689e6f0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 27 Jan 2023 16:09:35 +0100 Subject: Autocomplete methods --- src/syntax/node.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/syntax') 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) -> 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) -> Self { debug_assert!(!kind.is_error()); -- cgit v1.2.3