Skip to content

Commit

Permalink
feat(#331): add haskell comment parsing support
Browse files Browse the repository at this point in the history
  • Loading branch information
grantlemons committed Dec 26, 2024
1 parent 1cd29ac commit 50ee209
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions harper-comments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tree-sitter-bash = "0.20.0"
tree-sitter-java = "0.20.0"
tree-sitter-nix = "0.0.1"
itertools = "0.13.0"
tree-sitter-haskell = "0.15.0"

[dev-dependencies]
paste = "1.0.15"
3 changes: 3 additions & 0 deletions harper-comments/src/comment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ impl CommentParser {
"lua" => tree_sitter_lua::language(),
"shellscript" => tree_sitter_bash::language(),
"java" => tree_sitter_java::language(),
"haskell" => tree_sitter_haskell::language(),
_ => return None,
};

Expand Down Expand Up @@ -85,6 +86,8 @@ impl CommentParser {
"sh" => "shellscript",
"bash" => "shellscript",
"java" => "java",
"hs" => "haskell",
"lhs" => "haskell",
_ => return None,
})
}
Expand Down

0 comments on commit 50ee209

Please sign in to comment.