view Paper/src/ls.cbc @ 16:661c35912701

no image version
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Mon, 17 Apr 2023 10:27:01 +0900
parents 466b958a3419
children
line wrap: on
line source

__code ls(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
    Node* dir = new Node();
    dir->key = name->value;
    struct FTree* cDirectory = new FTree();
    cDirectory = gearsDirectory->currentDirectory;
    goto cDirectory->get(dir, ls2);
}

__code ls2(struct GearsDirectoryImpl* gearsDirectory, struct Node* node, __code next(...)) {
    printf("%d\n", node->key);
    goto next(...);
}