Commit a15036b7 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

add element_build_list

parent c03d1b72
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -71,6 +71,17 @@ ReturnCode element_build_all(
  return OK;
}

ReturnCode element_build_list(
    const Environment& env,
    const Expr* expr,
    std::vector<ElementRef>* elems) {
  if (!expr_is_list(expr)) {
    return ReturnCode::error("EARG", "expected an element list");
  }

  return element_build_all(env, expr_get_list(expr), elems);
}

void element_bind(
    ElementMap* factory,
    const std::string& name,
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ ReturnCode element_build_all(
    const Expr* expr,
    std::vector<ElementRef>* elems);

ReturnCode element_build_list(
    const Environment& env,
    const Expr* expr,
    std::vector<ElementRef>* elems);

void element_bind(
    ElementMap* factory,
    const std::string& name,