Skip to content

Commit 2bb3299

Browse files
authored
Identify public code (#180)
* Identify public code * Mark an unused function as dead code
1 parent c411a7a commit 2bb3299

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

src/asttools.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use tree_sitter::Node;
22

3+
#[allow(dead_code)]
34
pub fn get_parent<'a>(node: &'a Node<'a>, level: usize) -> Option<Node<'a>> {
45
let mut level = level;
56
let mut node = *node;

src/lib.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ extern crate serde_json;
1111
extern crate serde_yaml;
1212
extern crate toml;
1313

14+
pub(crate) mod c_macro;
15+
pub mod web;
16+
17+
#[macro_use]
18+
mod asttools;
19+
mod checker;
20+
1421
#[macro_use]
1522
mod macros;
1623
pub use crate::macros::*;
@@ -27,12 +34,6 @@ pub(crate) use languages::*;
2734
mod output;
2835
pub use output::*;
2936

30-
pub mod web;
31-
32-
#[macro_use]
33-
pub mod asttools;
34-
pub use crate::asttools::*;
35-
3637
pub mod spaces;
3738
pub use crate::spaces::*;
3839

@@ -48,8 +49,6 @@ pub use crate::function::*;
4849
pub mod count;
4950
pub use crate::count::*;
5051

51-
pub mod c_macro;
52-
5352
pub mod preproc;
5453
pub use crate::preproc::*;
5554

@@ -63,10 +62,7 @@ mod traits;
6362
pub use crate::traits::*;
6463

6564
mod ts_parser;
66-
pub use crate::ts_parser::*;
67-
68-
mod checker;
69-
pub use crate::checker::*;
65+
pub(crate) use crate::ts_parser::*;
7066

7167
mod comment_rm;
7268
pub use crate::comment_rm::*;

0 commit comments

Comments
 (0)