Make it easier to maintain and add new features on top of the base syntax.
Why
This is an attempt at avoiding shotgun surgery anti-pattern every time a change is necessary for the compiler pipeline.
It's becoming clear that every new feature or update needs multiple sets of changes across the parsing logic. For example, improving bool type parsing took 7 different file changes to the semantics parser. Meaning that there is a lot of interdependent logic, which is a smell. This is mainly an issue with syntax changes and language additions.
In theory, this should also make "syntax sugar" and external plugins a breeze.
This also enables a babel-like plugin system at least for a single phase(semantics). Resolves parts of #110
TODOs
[x] Split semantics parser up by language feature.
[x] ~Figure out what to do about the base parse step (it needs to be extendable as well)~
Goal
Make it easier to maintain and add new features on top of the base syntax.
Why
This is an attempt at avoiding shotgun surgery anti-pattern every time a change is necessary for the compiler pipeline.
It's becoming clear that every new feature or update needs multiple sets of changes across the parsing logic. For example, improving
bool
type parsing took 7 different file changes to the semantics parser. Meaning that there is a lot of interdependent logic, which is a smell. This is mainly an issue with syntax changes and language additions.In theory, this should also make "syntax sugar" and external plugins a breeze.
This also enables a babel-like plugin system at least for a single phase(semantics). Resolves parts of #110
TODOs