whole_func_string: function evaluateConditions(template, variables) {
    let source;
    do {
      source = template;
      template = processSimpleConditions(template, variables);
      template = processIfElseConditions(template, variables);
    } while (source !== template);
  
    return template;
  }
func_code_string: function evaluateConditions(template, variables) {
    let source;
    do {
      source = template;
      template = processSimpleConditions(template, variables);
      template = processIfElseConditions(template, variables);
    } while (source !== template);
  
    return template;
  }
func_documentation_string: Processes the if and if-else conditions in the template.
  
  @param {string} template The template to process.
  @param {Object<string, *>} variables The variables that should be available
  to the predicate expressions in the conditions.
  @return {string} Processed template.