sem-core 0.3.21

Entity-level semantic diff engine. Extracts functions, classes, and methods from 20 languages via tree-sitter and diffs at the entity level.
Documentation
use std::collections::HashMap;

pub struct Config {
    pub values: HashMap<String, String>,
    pub debug: bool,
}

impl Config {
    pub fn new() -> Self {
        Config {
            values: HashMap::new(),
            debug: false,
        }
    }

    pub fn get(&self, key: &str) -> Option<&String> {
        self.values.get(key)
    }

    pub fn set(&mut self, key: String, value: String) {
        self.values.insert(key, value);
    }
}

pub fn load_config(path: &str) -> Config {
    let mut config = Config::new();
    config.set("path".to_string(), path.to_string());
    config
}