formatting with rustfmt
This commit is contained in:
@ -64,7 +64,8 @@ pub Reactions: Vec<RSreaction> = {
|
||||
|
||||
Reaction: RSreaction = {
|
||||
"[" <r: Set> "," <i: Set> "," <p: Set> "]" => RSreaction::from(r, i, p),
|
||||
"[" "r:" <r: Set> "," "i:" <i: Set> "," "p:" <p: Set> "]" => RSreaction::from(r, i, p),
|
||||
"[" "r:" <r: Set> "," "i:" <i: Set> "," "p:" <p: Set> "]" =>
|
||||
RSreaction::from(r, i, p),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -87,14 +88,18 @@ CTX_process: RSprocess = {
|
||||
RSprocess::EntitySet{ entities: c, next_process: Rc::new(k) },
|
||||
"(" <k: CTX_process> ")" => k,
|
||||
"(" <k: Separeted<CTX_process, "+">> ")" =>
|
||||
RSprocess::Summation{ children: k.into_iter().map(Rc::new).collect::<Vec<_>>() },
|
||||
RSprocess::Summation{
|
||||
children: k.into_iter().map(Rc::new).collect::<Vec<_>>()
|
||||
},
|
||||
"<" <n: Num> <k1: CTX_process> ">" "." <k: CTX_process> =>
|
||||
RSprocess::WaitEntity{ repeat: n,
|
||||
repeated_process: Rc::new(k1),
|
||||
next_process: Rc::new(k)},
|
||||
next_process: Rc::new(k) },
|
||||
"nil" => RSprocess::Nill,
|
||||
<identifier: Literal> =>
|
||||
RSprocess::RecursiveIdentifier{ identifier: translator.encode(identifier) }
|
||||
RSprocess::RecursiveIdentifier{
|
||||
identifier: translator.encode(identifier)
|
||||
}
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -165,5 +170,8 @@ pub System: RSsystem = {
|
||||
"Initial Entities:" <available_entities: Set>
|
||||
"Context:" <context_process: Context>
|
||||
"Reactions:" <reaction_rules: Reactions>
|
||||
=> RSsystem::from(delta.into(), available_entities, context_process, Rc::new(reaction_rules))
|
||||
=> RSsystem::from(delta.into(),
|
||||
available_entities,
|
||||
context_process,
|
||||
Rc::new(reaction_rules))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user