orbit-lang/Bootstrap

Frontend - Parse Rule Utility

オープン

#2 opened on 2021/05/16

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Kotlin (0 件のフォーク)auto 404
Frontendgood first issue

Repository metrics

Stars
 (0 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド