From 4e61c6dd6e8cbc1dee1c6166840d3701504124c7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 23 Jan 2024 13:53:40 -0500 Subject: [PATCH] Add TODO item --- src/abstract_tree/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/abstract_tree/mod.rs b/src/abstract_tree/mod.rs index e55d7f7..7abf79a 100644 --- a/src/abstract_tree/mod.rs +++ b/src/abstract_tree/mod.rs @@ -72,6 +72,9 @@ pub struct Root { statements: Vec, } +// TODO Change Root to use tree sitter's cursor to traverse the statements +// instead of indexes. This will be more performant when there are a lot of +// top-level statements in the tree. impl AbstractTree for Root { fn from_syntax(node: SyntaxNode, source: &str, context: &Map) -> Result { Error::expect_syntax_node(source, "root", node)?;