orbit-lang/Bootstrap

Frontend - Parse Rule Utility

Aperta

#2 aperta il 16 mag 2021

 (0 commenti) (0 reazioni) (0 assegnatari)Kotlin (0 fork)auto 404
Frontendgood first issue

Metriche repository

Star
 (0 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor