Skip to content

Commit

Permalink
Remove html language (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 authored Nov 20, 2020
1 parent 200e7d8 commit cb37ad9
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 59 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
[submodule "tree-sitter-java"]
path = tree-sitter-java
url = https://github.com/tree-sitter/tree-sitter-java/
[submodule "tree-sitter-html"]
path = tree-sitter-html
url = https://github.com/tree-sitter/tree-sitter-html/
[submodule "tree-sitter-go"]
path = tree-sitter-go
url = https://github.com/tree-sitter/tree-sitter-go/
Expand Down
1 change: 0 additions & 1 deletion enums/src/languages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ mk_langs!(
// 2) tree-sitter function to call to get a Language
(Java, tree_sitter_java),
(Go, tree_sitter_go),
(Html, tree_sitter_html),
(Rust, tree_sitter_rust),
(Cpp, tree_sitter_cpp),
(Python, tree_sitter_python),
Expand Down
23 changes: 0 additions & 23 deletions src/alterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,6 @@ impl Alterator for GoCode {
}
}

impl Alterator for HtmlCode {
fn alterate(node: &Node, code: &[u8], span: bool, children: Vec<AstNode>) -> AstNode {
match Html::from(node.object().kind_id()) {
Html::QuotedAttributeValue => {
if let [q1, attr, q2] = &children[..] {
let span = if span {
let (x, y, _, _) = q1.span.unwrap();
let (_, _, t, u) = q2.span.unwrap();
Some((x, y + 1, t, u - 1))
} else {
None
};

AstNode::new(attr.r#type, attr.value.clone(), span, Vec::new())
} else {
Self::get_default(node, code, span, children)
}
}
_ => Self::get_default(node, code, span, children),
}
}
}

impl Alterator for RustCode {
fn alterate(node: &Node, code: &[u8], span: bool, children: Vec<AstNode>) -> AstNode {
match Rust::from(node.object().kind_id()) {
Expand Down
9 changes: 0 additions & 9 deletions src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,6 @@ impl Checker for GoCode {
mk_checker!(is_non_arg,);
}

impl Checker for HtmlCode {
mk_checker!(is_comment, Comment);
mk_checker!(is_string,);
mk_checker!(is_call,);
mk_checker!(is_func,);
mk_checker!(is_func_space,);
mk_checker!(is_non_arg,);
}

impl Checker for RustCode {
mk_checker!(is_comment, LineComment, BlockComment);

Expand Down
1 change: 0 additions & 1 deletion src/getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,4 +472,3 @@ impl Getter for PreprocCode {}
impl Getter for CcommentCode {}
impl Getter for JavaCode {}
impl Getter for GoCode {}
impl Getter for HtmlCode {}
10 changes: 0 additions & 10 deletions src/langs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ mk_langs!(
[go],
["go"]
),
(
Html,
"The `HTML` language",
"html",
HtmlCode,
HtmlParser,
tree_sitter_html,
[html],
["html"]
),
(
Rust,
"The `Rust` language",
Expand Down
3 changes: 0 additions & 3 deletions src/languages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ pub use language_cpp::*;
pub mod language_go;
pub use language_go::*;

pub mod language_html;
pub use language_html::*;

pub mod language_java;
pub use language_java::*;

Expand Down
1 change: 0 additions & 1 deletion src/metrics/cognitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ impl Cognitive for PreprocCode {}
impl Cognitive for CcommentCode {}
impl Cognitive for JavaCode {}
impl Cognitive for GoCode {}
impl Cognitive for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/cyclomatic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ impl Cyclomatic for PreprocCode {}
impl Cyclomatic for CcommentCode {}
impl Cyclomatic for JavaCode {}
impl Cyclomatic for GoCode {}
impl Cyclomatic for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ impl Exit for PreprocCode {}
impl Exit for CcommentCode {}
impl Exit for JavaCode {}
impl Exit for GoCode {}
impl Exit for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/fn_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ impl NArgs for PreprocCode {}
impl NArgs for CcommentCode {}
impl NArgs for JavaCode {}
impl NArgs for GoCode {}
impl NArgs for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/halstead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ impl Halstead for PreprocCode {}
impl Halstead for CcommentCode {}
impl Halstead for JavaCode {}
impl Halstead for GoCode {}
impl Halstead for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ impl Loc for PreprocCode {}
impl Loc for CcommentCode {}
impl Loc for JavaCode {}
impl Loc for GoCode {}
impl Loc for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/mi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ impl Mi for PreprocCode {}
impl Mi for CcommentCode {}
impl Mi for JavaCode {}
impl Mi for GoCode {}
impl Mi for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion src/metrics/nom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ impl Nom for PreprocCode {}
impl Nom for CcommentCode {}
impl Nom for JavaCode {}
impl Nom for GoCode {}
impl Nom for HtmlCode {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 0 additions & 1 deletion tree-sitter-html
Submodule tree-sitter-html deleted from 7f442e

0 comments on commit cb37ad9

Please sign in to comment.