MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_sfc_script_host

Function is_sfc_script_host

codegraph-kernel/src/tsjs/mod.rs:165–168  ·  view source on GitHub ↗

SFC_SCRIPT_HOST_FILE (tree-sitter.ts, #3393): a single-file component, whose script blocks the TS extractor reads under the component's own path. The kernel is never handed one; the check keeps the two readings the same.

(path: &str)

Source from the content-addressed store, hash-verified

163/// script blocks the TS extractor reads under the component's own path. The
164/// kernel is never handed one; the check keeps the two readings the same.
165fn is_sfc_script_host(path: &str) -> bool {
166 let lower = path.to_ascii_lowercase();
167 lower.ends_with(".vue") || lower.ends_with(".svelte") || lower.ends_with(".astro")
168}
169
170/// One scope-stack entry (TS keeps node IDs; rows are our equivalent).
171struct Scope {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected