@@ -0,0 +1,2180 @@
+package org.minijs.core.parser;%0A%0Aimport org.antlr.v4.runtime.tree.ParseTree;%0Aimport org.junit.Test;%0Aimport org.minijs.core.ast.*;%0A%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class BlockStatementTest extends BaseParserTest %7B%0A%0A    @Test%0A    public void testBlockStatement() %7B%0A        String%5B%5D statements = %7B%0A                %22%7B%7D%22,%0A                %22%7Bif(true);%7D%22,%0A                %22%7Ba = 3;%7D%22,%0A                %22%7Bbreak;%7D%22,%0A                %22%7Bcontinue;%7D%22,%0A                %22%7Breturn true;%7D%22,%0A                %22%7Ba = b + c;%7D%22,%0A                %22%7Ba = bar(100);%7D%22,%0A                %22%7Ba += 10 * (c + d);%7D%22,%0A        %7D;%0A%0A        int%5B%5D expectedSubStatementNum = %7B%0A                0,%0A                1, 1, 1, 1, 1, 1, 1, 1,%0A        %7D;%0A%0A        Class%5B%5D expectedFirstSubstatemntClasses = %7B%0A                null,%0A                IfStatement.class,%0A                ExpressionStatement.class,%0A                BreakStatement.class,%0A                ContinueStatement.class,%0A                ReturnStatement.class,%0A                ExpressionStatement.class,%0A                ExpressionStatement.class,%0A                ExpressionStatement.class,%0A        %7D;%0A%0A        for (int i = 0; i %3C statements.length; i++) %7B%0A            initParser(statements%5Bi%5D);%0A            ParseTree tree = mParser.program();%0A            Node node = mVisitor.visit(tree);%0A%0A            assertEquals(BlockStatement.class, node.getClass());%0A            List%3CStatement%3E statementList = ((BlockStatement) node).getSubStatementList();%0A%0A            assertEquals(1, statementList.size());%0A%0A            Statement statement = statementList.get(0);%0A            assertEquals(BlockStatement.class, statement.getClass());%0A%0A            BlockStatement blockStatement = (BlockStatement) statement;%0A            assertNotNull(blockStatement);%0A            int subStatementNum = blockStatement.getSubStatementList().size();%0A%0A            assertEquals(expectedSubStatementNum%5Bi%5D, subStatementNum);%0A%0A            if (subStatementNum == 1) %7B%0A                assertEquals(%0A                        expectedFirstSubstatemntClasses%5Bi%5D,%0A                        blockStatement.getSubStatementList().get(0).getClass());%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Add BlockStatementTest