diff --git a/source/tlang/compiler/codegen/emit/core.d b/source/tlang/compiler/codegen/emit/core.d index 047cd0b..5dda416 100644 --- a/source/tlang/compiler/codegen/emit/core.d +++ b/source/tlang/compiler/codegen/emit/core.d @@ -165,7 +165,11 @@ public abstract class CodeEmitter * * Params: * instruction = The Instruction to transform/emit + * customRules = an `Object` to be interpreted by + * the underlying emitter which can change how certain + * transformations are done when it is in a certain state + * * Returns: The Instruction emit as a string */ - public abstract string transform(Instruction instruction); + public abstract string transform(Instruction instruction, Object customRules = null); } \ No newline at end of file diff --git a/source/tlang/compiler/codegen/emit/dgen.d b/source/tlang/compiler/codegen/emit/dgen.d index 4a9a719..196b3c7 100644 --- a/source/tlang/compiler/codegen/emit/dgen.d +++ b/source/tlang/compiler/codegen/emit/dgen.d @@ -110,7 +110,7 @@ public final class DCodeEmitter : CodeEmitter } - public override string transform(const Instruction instruction) + public override string transform(const Instruction instruction, Object customRules = null) { writeln("\n"); gprintln("transform(): "~to!(string)(instruction));