mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-20 00:40:18 +00:00
17 lines
407 B
Rust
17 lines
407 B
Rust
|
|
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");
|
||
|
|
}
|
||
|
|
}
|