package com.davidmogar.njc.ast;

import com.davidmogar.njc.ast.statements.Block;

import java.util.List;

public class Program implements AstNode {

    public List<Block> blocks;

    public Program(List<Block> blocks) {
        this.blocks = blocks;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        blocks.forEach(builder::append);
        return builder.toString();
    }
}

@@ -67,21 +67,38 @@
 tements.
-Block
+definitions.Definition
 ;%0A%0Aimpor
@@ -175,28 +175,38 @@
 ic List%3C
-Block%3E block
+Definition%3E definition
 s;%0A%0A    
@@ -229,52 +229,72 @@
 ist%3C
-Block%3E blocks) %7B%0A        this.blocks = block
+Definition%3E definitions) %7B%0A        this.definitions = definition
 s;%0A 
@@ -409,13 +409,18 @@
     
-block
+definition
 s.fo

Change Program to accept definitions instead of blocks