diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-12-08 06:27:15 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-12-08 06:43:01 +0100 |
commit | 0d20548e3846cb80acca07fad2a1dc3cfe024528 (patch) | |
tree | 6605eb393af99914b4cce483f56e1becbcbe073d /app/Extract.hs | |
parent | 5842e730152a2ae11fc8772a505baa3ba81b1e9c (diff) |
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.
Diffstat (limited to 'app/Extract.hs')
-rw-r--r-- | app/Extract.hs | 17 |
1 files changed, 17 insertions, 0 deletions
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 |