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
This commit is contained in:
parent
4e8fb0a801
commit
75372ee132
|
@ -165,7 +165,11 @@ public abstract class CodeEmitter
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* instruction = The Instruction to transform/emit
|
* 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
|
* 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");
|
writeln("\n");
|
||||||
gprintln("transform(): "~to!(string)(instruction));
|
gprintln("transform(): "~to!(string)(instruction));
|
||||||
|
|
Loading…
Reference in New Issue