package mustache.clojure.glue;

import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.DefaultMustacheVisitor;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.TemplateContext;

/**
 *
 * @author bill
 */
public class ClojureMustacheVisitor extends DefaultMustacheVisitor  {

    public ClojureMustacheVisitor(DefaultMustacheFactory df) {
        super(df);
    }

    @Override
    public void iterable(TemplateContext templateContext, String variable, Mustache mustache) {
        list.add(new ClojureIterableCode(templateContext, df, mustache, variable));
    }

}

@@ -223,16 +223,70 @@
 Context;
+%0Aimport com.github.mustachejava.codes.NotIterableCode;
 %0A%0A/**%0A *
@@ -667,10 +667,235 @@
 %0A    %7D%0A%0A
+    @Override%0A    public void notIterable(TemplateContext templateContext, String variable, Mustache mustache) %7B%0A        list.add(new ClojureNotIterableCode(templateContext, df, mustache, variable));        %0A    %7D%0A%0A    %0A    %0A
 %7D%0A

Handle inverted sections correctly