added transform routine for expr -> RPN

This commit is contained in:
Irmen de Jong
2023-03-16 02:27:30 +01:00
parent 7fea0c124a
commit 8ffca93cd5
15 changed files with 175 additions and 127 deletions
@@ -16,6 +16,10 @@ class ExperiCodeGen: ICodeGeneratorBackend {
options: CompilationOptions,
errors: IErrorReporter
): IAssemblyProgram? {
// If we want RPN expressions instead, use this:
// program.transformBinExprToRPN()
// you could write a code generator directly on the PtProgram AST,
// but you can also use the Intermediate Representation to build a codegen on:
val irCodeGen = IRCodeGen(program, symbolTable, options, errors)