From 763f1eff910068be519bd6c64a50a79705542b89 Mon Sep 17 00:00:00 2001 From: Corey Williamson Date: Thu, 18 May 2023 14:52:25 -0500 Subject: [PATCH] scripts/todos: handle ltreesitter changes --- scripts/todos.tl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/todos.tl b/scripts/todos.tl index 33b0287..5ac4967 100644 --- a/scripts/todos.tl +++ b/scripts/todos.tl @@ -43,7 +43,8 @@ for path in fs.scan_dir(".", {"src/cyan/**/*"}) do local root = teal_parser:parse_string(text):root() local todos : {Todo} = {} for match in query:match(root) do - local node = match.captures.c + local node = match.captures.c as ts.Node + assert(node is ts.Node) table.insert(todos, { line = node:start_point().row, content = node:source():match("TODO%s*:?%s*(.*)"),