Repository metrics
- Stars
- (0 stars)
- PR merge metrics
- (PR metrics pending)
Description
Some parse rules depend on other parse rules to parse sub-expressions (non-terminals). This is fine, but we should avoid manually constructing these rules and hide them behind a ParseRuleUtil interface, as we do in the TypeChecker.
I wouldn't mind even making ParseRules themselves private, and only exposing them via ParseRuleUtil singleton, which is itself injected via Koin. We do this already with TypeInferenceUtil and the path resolvers in the Graph package.
Ultimately, the goal is to have simple, clean interfaces that tightly control how the compiler (and more importantly library code) interacts with itself. Essentially, I'm talking about something akin to a "plugin" system that makes it trivially easy to write new phases in Orbit and allow them to communicate with & interogate the compiler at abritrary Phase-time.