private String compileCommand(Node command) throws CompilationErrorException {
        StringBuilder builder = new StringBuilder();
        switch (command.getNodeType()) {
            case ASSIGNED:
                builder.append(compileAssignValue(command));
                break;

            case RETURN:
                builder.append(compileReturn(command));
                break;

            case PRINT:
                builder.append(compilePrint(command));
                break;

            case DECLARE:
                builder.append(compileVariableDeclaration(command));
                break;

            case METHOD_CALL:
                builder.append(compileMethodCall((MethodCallNode) command));
                break;

            case CONDITIONAL_CONSTRUCTION:
                builder.append(compileConditionalConstruction((ConditionalConstructionNode) command));
                break;

            case WHILE_BLOCK:
                builder.append(compileWhileBlock((WhileBlockNode) command));
                break;

            default:
                builder.append(CodeBuilder.CODE_INDENT)
                        .append("UNEXPECTED NODE\n");
                break;
        }

        return builder.toString();
    }