view Paper/src/ls.cbc @ 39:701d5906f7f0

...
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Sat, 20 Jan 2024 15:52:13 +0900
parents 83b783747d1a
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(...);
}