mlcg 0.0.1

Mindustry Logic Code Generator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub use mlcg_derive::*;

use crate::processor::Processor;

pub trait WithCore {
    fn core(&self) -> Option<&Processor>;
}

impl<T> WithCore for T {
    default fn core(&self) -> Option<&Processor> {
        None
    }
}

pub trait Eval<T>: WithCore {
    fn eval(self) -> T;
}