Struct pink_runtime::Runtime
source · pub struct Runtime {
pub structures: BTreeMap<String, Structure>,
}Fields§
§structures: BTreeMap<String, Structure>Implementations§
source§impl Runtime
impl Runtime
sourcepub fn eval(&self, expression: Expression) -> Expression
pub fn eval(&self, expression: Expression) -> Expression
Returns the lowest possible evaluation
sourcepub fn evaluations(&self, expression: Expression) -> BTreeSet<Expression>
pub fn evaluations(&self, expression: Expression) -> BTreeSet<Expression>
Returns a set of all possible evaluations
source§impl Runtime
impl Runtime
pub fn new(structures: BTreeMap<String, Structure>) -> Self
sourcepub fn domain(&self) -> impl Iterator<Item = &String> + '_
pub fn domain(&self) -> impl Iterator<Item = &String> + '_
Iterator that goes through each element in the domains of the structures of the runtime
sourcepub fn reserved(&self) -> impl Iterator<Item = &String> + '_
pub fn reserved(&self) -> impl Iterator<Item = &String> + '_
Iterator that goes through each literal in the reserved keywords of the structures of the runtime
sourcepub fn definitions(&self) -> impl Iterator<Item = &Definition> + '_
pub fn definitions(&self) -> impl Iterator<Item = &Definition> + '_
Iterator that goes through each literal in the reserved keywords of the structures of the runtime