From 0d20548e3846cb80acca07fad2a1dc3cfe024528 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 8 Dec 2023 06:27:15 +0100 Subject: chore: drop tree-grepper Regresses in that we only support Haskell for now, as Elm, Nix or Bash are not available as tree-sitter-* Haskell packages. --- app/Extract.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/Extract.hs (limited to 'app/Extract.hs') diff --git a/app/Extract.hs b/app/Extract.hs new file mode 100644 index 0000000..e351898 --- /dev/null +++ b/app/Extract.hs @@ -0,0 +1,17 @@ +module Extract where + +data Comment = Comment + { -- result fields + file :: String, + file_type :: FileType, + -- match fields + kind :: String, + name :: String, + text :: T.Text, + start :: Position, + end :: Position + } + +extractComments :: T.Text -> IO [Comment] +extractComments = do + parer <- ts_parser_new -- cgit v1.2.3