weavatrix-parse 0.3.3

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
17
18
use super::extract;
use crate::facts::{DeclarationKind, ImportBinding, ReferenceKind};
use crate::syntax::Language;

fn declared(source: &str, language: Language) -> Vec<(String, DeclarationKind, Option<String>)> {
    extract(source, language)
        .declarations
        .into_iter()
        .map(|item| (item.name, item.kind, item.owner))
        .collect()
}

mod go;
mod managed;
mod native;
mod robustness;
mod rust;
mod swift;