@Override
    public Body parseBody() throws IOException {
        Body b = new Body();

        while (curToken.type != Lexer.Type.RIGHT_BRACES) {
            Command command = parseCommand();
            b.getCommandList().add(command);
            if (curToken.type == SEMICOLON) {
                curToken = lexer.getToken();
            } else {
                if (command.getClass() != IfStatementCommand.class
                        && command.getClass() != WhileStatementCommand.class) {
                    throw new IOException("missing ;");
                }
            }
        }

        return b;
    }