@@ -0,0 +1,786 @@
+package yokohama.unit.ast;%0D%0A%0D%0Aimport java.util.List;%0D%0Aimport java.util.stream.Collectors;%0D%0Aimport java.util.stream.Stream;%0D%0A%0D%0Apublic class CodeBlockExtractVisitor %7B%0D%0A    public List%3CCodeBlock%3E visit(Group group) %7B%0D%0A        List%3CDefinition%3E definitions = group.getDefinitions();%0D%0A        return definitions%0D%0A                .stream()%0D%0A                .flatMap(definition -%3E%0D%0A                        definition.accept(%0D%0A                                test -%3E Stream.empty(),%0D%0A                                fourPhaseTest -%3E Stream.empty(),%0D%0A                                table -%3E Stream.empty(),%0D%0A                                codeBlock -%3E Stream.of(codeBlock),%0D%0A                                heading -%3E Stream.empty()))%0D%0A                .collect(Collectors.toList());%0D%0A    %7D%0D%0A%7D%0D%0A

Create CodeBlockExtractVisitor