yog_script_build/lib.rs
1//! Yog Script's compiler: a source checked (`check_source` — read, its
2//! names resolved; with the generator, compiled), against the class index
3//! of the Minecraft versions it targets (`index`, built from the game's
4//! jars, read with `classfile`). It knows sources, not projects: the Yog
5//! CLI hands it a mod's, the `yog-script` tool any.
6
7mod classfile;
8pub mod index;
9
10use yog_data::Diagnostic;
11
12/// What's wrong with the source `text` of the file `name` (`.ys`, `.yns`).
13#[must_use]
14pub fn check_source(name: &str, text: &str) -> Vec<Diagnostic> {
15 yog_script_analyze::check(name, text).problems
16}