Skip to main content

mysz_core/
lib.rs

1pub mod backend;
2pub mod compiler;
3pub mod ir;
4pub mod lex;
5pub mod parse;
6pub mod semantics;
7pub mod utils;
8
9use std::path::{Path, PathBuf};
10
11pub fn compile_file<P: AsRef<Path>>(
12    input_path: P,
13    output_filename: &str,
14    search_paths: &[PathBuf],
15    output_json: bool,
16) -> Result<(), String> {
17    compiler::compile_root_file(input_path, output_filename, search_paths, output_json)
18}
19
20pub fn check_file<P: AsRef<Path>>(
21    input_path: P,
22    search_paths: &[PathBuf],
23    output_json: bool,
24) -> Result<(), String> {
25    compiler::check_root_file(input_path, search_paths, output_json)
26}