I'll stop asking questions now. I feel I'm reaching the limits even of assumption and might start getting silly. (For instance: "Could I write a function that let me select nodes within a loaded function using CSS Selector syntax?", but that's just silly so I won't ask it).
Sorry for asking obtuse questions obtusely. Let me try this way:
How much would codetree need to change to accept a function or macro as input instead of a file, and produce output that is similarly meaningful? (Not at all, a little bit, a lot).
Sorry again for poor question quality, and to harp on what increasingly appears to be an unimportant point.