CodeEmitter

- Added a new parameter to `transform(Instruction)` (now `transform(Instruction, Object)`. `customRules` is an `Object` to be interpreted by the underlying emitter which can change how certain transformations are done when it is in a certain state

DGen

- Uses new `CodeEmitter` API
hotfix/jcli_upgrade_fix
Tristan B. V. Kildaire 10 months ago
parent 4e8fb0a801
commit 75372ee132

@ -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);
}

@ -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));

Loading…
Cancel
Save