Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion 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 @@ -36,6 +36,7 @@ tree-sitter-zig = "1"
tree-sitter-haskell = "0.23"
tree-sitter-ocaml = "0.24"
tree-sitter-clojure-orchard = "0.2"
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 @@ -370,6 +370,23 @@ pub const CLOJURE_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 @@ -20,6 +20,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 @@ -130,5 +131,8 @@ pub fn extract_symbols_with_opts(
LanguageKind::Clojure => {
clojure::ClojureExtractor.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