weavatrix-parse 0.3.4

Dependency-free source tokenizer and structural extractor for repository intelligence
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::extract;
use crate::facts::{DeclarationKind, ImportBinding, ReferenceKind};
use crate::syntax::Language;

fn specifiers(source: &str) -> Vec<(String, bool, bool)> {
    extract(source, Language::TypeScript)
        .imports
        .into_iter()
        .map(|import| (import.specifier, import.type_only, import.reexport))
        .collect()
}

mod calls;
mod declarations;
mod imports;
mod templates;