Commit 5084265f authored by Jeff Smits's avatar Jeff Smits

Fixed up implode to work the same as mkterm

parent 071f4fe4
......@@ -421,10 +421,17 @@ impl BuildTerm {
.map_err(|_| Error::UnknownBehaviour(
"Non-list in build of explode pattern (#) second argument"))?;
if let Some(string) = cons.get_string() {
let application = context.factory.t_application(string, children.iter().cloned());
if let Some(s) = cons.get_string() {
let string = context
.factory
.application(s.clone(), ::std::iter::empty());
if string.get_string().is_some() {
Ok(string)
} else {
let application = context.factory.t_application(s, children.iter().cloned());
Ok(context.factory.with_annos(application, annos.unwrap_or_default()))
Ok(context.factory.with_annos(application, annos.unwrap_or_default()))
}
} else if let Some(_) = cons.get_application() {
Err(Error::StrategyFailed)
} else if let Some(_) = cons.get_list() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment