Skip to content

Commit

Permalink
scripts/todos: handle ltreesitter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
euclidianAce committed May 18, 2023
1 parent 31c9ecc commit 763f1ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/todos.tl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ for path in fs.scan_dir(".", {"src/cyan/**/*"}) do
local root <const> = teal_parser:parse_string(text):root()
local todos <const>: {Todo} = {}
for match in query:match(root) do
local node <const> = match.captures.c
local node <const> = 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*(.*)"),
Expand Down

0 comments on commit 763f1ef

Please sign in to comment.