mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 17:30:17 +00:00
initial actions, entries, generators mechanism!
This commit is contained in:
16
src/generators.rs
Normal file
16
src/generators.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use crate::config::{EntryDeclaration, GeneratorDeclaration};
|
||||
use crate::context::Context;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub mod matrix;
|
||||
|
||||
pub fn generate(
|
||||
context: Rc<Context>,
|
||||
generator: &GeneratorDeclaration,
|
||||
) -> Vec<(Rc<Context>, EntryDeclaration)> {
|
||||
if let Some(matrix) = &generator.matrix {
|
||||
matrix::generate(context, matrix)
|
||||
} else {
|
||||
panic!("unknown action configuration");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user