package yokohama.unit.ast;

import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Value;
import yokohama.unit.position.Span;

@Value
@EqualsAndHashCode(exclude={"span"})
public class CodeBlock implements Definition {
    Heading heading;
    String lang;
    List<String> lines;    
    Span span;

    @Override
    public <T> T accept(DefinitionVisitor<T> visitor) {
        return visitor.visitCodeBlock(this);
    }
}

@@ -139,16 +139,50 @@
 n.Span;%0D
+%0Aimport yokohama.unit.util.Lists;%0D
 %0A%0D%0A@Valu
@@ -357,16 +357,660 @@
 pan;%0D%0A%0D%0A
+    public String getCode(%0D%0A            String lineSeparator, boolean appendLineSeparatorAtTheEnd) %7B%0D%0A        StringBuilder sb = new StringBuilder();%0D%0A        Lists.mapInitAndLast(lines,%0D%0A                line -%3E %7B%0D%0A                    sb.append(line);%0D%0A                    sb.append(lineSeparator);%0D%0A                    return null;%0D%0A                %7D,%0D%0A                line -%3E %7B%0D%0A                    sb.append(line);%0D%0A                    if (appendLineSeparatorAtTheEnd) %7B%0D%0A                        sb.append(lineSeparator);%0D%0A                    %7D%0D%0A                    return null;%0D%0A                %7D);%0D%0A        return sb.toString();%0D%0A    %7D%0D%0A%0D%0A
     @Ove

Add getCode method