Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Automatic scope item declarations/hoisting #15

Open
facekapow opened this issue Sep 7, 2019 · 0 comments
Open

Automatic scope item declarations/hoisting #15

facekapow opened this issue Sep 7, 2019 · 0 comments

Comments

@facekapow
Copy link
Contributor

What this is allowing scope items to be used before they're defined (which also makes cyclically-dependent modules possible).

How would this be implemented? I'm not sure. One approach is to replace all direct usages of ScopeItem with listeners that are called when an item with that name is added to the scope. Another approach would be to make two passes over the AST, one to declare a scope items, and another to actually define them. Yet another approach (one which I'm leaning towards as it seems more feasible) is to modify the current DET system to instead use the AST as the information store, and have findAll directly traverse the AST instead of a scope's own item list. The only major issue I can think of with the last option is generics. Maybe it should use the DH (detail handles) instead of the AST 🤔.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant