Skip to content
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 crates/codegraph-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tree-sitter-dart = "0.0.4"
tree-sitter-zig = "1"
tree-sitter-haskell = "0.23"
tree-sitter-ocaml = "0.24"
tree-sitter-verilog = "1.0.3"
rayon = "1"
ignore = "0.4"
globset = "0.4"
Expand Down
17 changes: 17 additions & 0 deletions crates/codegraph-core/src/extractors/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,23 @@ pub const OCAML_AST_CONFIG: LangAstConfig = LangAstConfig {
string_prefixes: &[],
};

/// Verilog/SystemVerilog AST config.
///
/// The WASM-side `AST_TYPE_MAPS` (in `src/ast-analysis/rules/index.ts`) has no
/// `verilog` entry, so the JS engine emits no `ast_nodes` rows for Verilog
/// files. Keeping every list empty produces the same outcome here: the generic
/// walker visits every node but classifies none, so nothing is pushed. If the
/// JS map ever grows a Verilog entry, mirror it here.
pub const VERILOG_AST_CONFIG: LangAstConfig = LangAstConfig {
new_types: &[],
throw_types: &[],
await_types: &[],
string_types: &[],
regex_types: &[],
quote_chars: &['"'],
string_prefixes: &[],
};

// ── Generic AST node walker ──────────────────────────────────────────────────

/// Node types that represent identifiers across languages.
Expand Down
4 changes: 4 additions & 0 deletions crates/codegraph-core/src/extractors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod ruby;
pub mod rust_lang;
pub mod scala;
pub mod swift;
pub mod verilog;
pub mod zig;

use crate::parser_registry::LanguageKind;
Expand Down Expand Up @@ -126,5 +127,8 @@ pub fn extract_symbols_with_opts(
LanguageKind::Ocaml | LanguageKind::OcamlInterface => {
ocaml::OcamlExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
LanguageKind::Verilog => {
verilog::VerilogExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
}
}
Loading
Loading