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

Method is_exported_later

codegraph-kernel/src/tsjs/extractors.rs:697–705  ·  view source on GitHub ↗

A top-level binding exported by a LATER statement rather than at its declaration: `export default NAME`, `export { NAME }`, `export { NAME as default }`. The declaration's own `is_exported` (an `export_statement` ancestor) cannot see these. Mirrors TreeSitterExtractor.isExportedLater.

(&self, name: &str)

Source from the content-addressed store, hash-verified

695 /// default }`. The declaration's own `is_exported` (an `export_statement`
696 /// ancestor) cannot see these. Mirrors TreeSitterExtractor.isExportedLater.
697 pub(super) fn is_exported_later(&self, name: &str) -> bool {
698 if name.is_empty()
699 || !name.chars().next().map(|c| c.is_ascii_alphabetic() || c == '_' || c == '$').unwrap_or(false)
700 || !name.chars().all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '$')
701 {
702 return false;
703 }
704 self.later_exports().contains(name)
705 }
706
707 /// Every name a statement of the file exports after it was declared: the
708 /// one `export default NAME` names, and each word between the braces of an

Callers 1

extract_variableMethod · 0.80

Calls 4

mapMethod · 0.80
nextMethod · 0.80
later_exportsMethod · 0.80
allMethod · 0.65

Tested by

no test coverage detected