aboutsummaryrefslogtreecommitdiffstats
path: root/app/Extract.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Extract.hs')
-rw-r--r--app/Extract.hs17
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