epatrizio / comp2mzam

Imperative language compiler to the Mini-ZAM
The Unlicense
0 stars 0 forks source link

Refactoring AST type expression decoration #12

Open epatrizio opened 2 years ago

epatrizio commented 2 years ago

AST type expression decoration implementation is not optimal, not elegant! Actually, everything is in the same AST (localization and expression type). The best practice is to construct different AST. In our context, there would be 2 AST : The typer would take the AST from syntactic analyzer (so with localization) to build a new AST with expression typing, to pass it to the compiler.