#![allow(unused)]
#![cfg_attr(coverage_nightly, coverage(off))]
#[cfg(feature = "c-ast")]
use crate::services::context::AstItem;
#[cfg(feature = "c-ast")]
use std::path::{Path, PathBuf};
#[cfg(feature = "c-ast")]
pub struct CAstVisitor {
items: Vec<AstItem>,
_file_path: PathBuf,
current_scope: Vec<String>,
is_header: bool,
}
include!("c_visitor.rs");
#[cfg(feature = "c-ast")]
pub struct CComplexityAnalyzer {
cyclomatic_complexity: u32,
cognitive_complexity: u32,
}
#[cfg(feature = "c-ast")]
impl Default for CComplexityAnalyzer {
fn default() -> Self {
Self::new()
}
}
include!("c_complexity.rs");
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(test)]
mod tests {
#[cfg(feature = "c-ast")]
use super::*;
#[cfg(feature = "c-ast")]
use std::path::Path;
include!("c_tests.rs");
}