use yog_sync::LazyLock;
use crate::ast::Decl;
pub const ROOT: &str = "System";
pub const RESULT: &str = "Result";
pub const DERIVE: &str = "Derive";
pub const ITEM: &str = "Item";
pub const FIELD: &str = "Field";
pub const PROC_MACRO: &str = "ProcMacro";
pub const DERIVE_MACRO: &str = "DeriveMacro";
pub const MACRO: &str = "Macro";
pub const SERVICE: &str = "Service";
pub const EVENT: &str = "Event";
pub const PROVIDE: &str = "Provide";
const SOURCES: &[(&str, &str)] = &[
("System.ys", include_str!("system/System.ys")),
("System.Meta.ys", include_str!("system/System.Meta.ys")),
(
"System.Yog.Native.ys",
include_str!("system/System.Yog.Native.ys"),
),
];
pub static DECLS: LazyLock<Vec<Decl>> = LazyLock::new(|| {
SOURCES
.iter()
.flat_map(|(name, src)| crate::parse(name, src).file.decls)
.collect()
});