syster-base 0.4.0-alpha

Core library for SysML v2 and KerML parsing, AST, and semantic analysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use syster::ide::AnalysisHost;

fn main() {
    let content = r#"calc def ComputeBSFC {
    return : Real;
}"#;

    let mut host = AnalysisHost::new();
    host.set_file_content("/test.sysml", content);

    let analysis = host.analysis();
    println!("=== Symbols ===");
    for sym in analysis.symbol_index().all_symbols() {
        println!("  {} (type_refs: {:?})", sym.qualified_name, sym.type_refs);
    }
}