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*(.*)"),