public function compile(Node\File $node): array {
        if (is_null($node->class)) {
            throw new UnexpectedValueException('File without class cannot be saved');
        }

        $result = $node->uses;

        if (is_a($node->class, Node\Class_::class)) {
            $result[] = $this->compileClass($node->class);
        } else if (is_a($node->class, Node\Enum::class)) {
            $result[] = $this->compileEnum($node->class);
        }

        if (!is_null($node->namespace)) {
            $result = [new PHPNode\Stmt\Namespace_($node->namespace, $result)];
        }

        return $result;
    }