Implement XON/XOFF
This commit is contained in:
@@ -908,6 +908,14 @@ class Compiler
|
||||
compilePushReference(swap.item1, sc);
|
||||
genCode(new SwapCode());
|
||||
}
|
||||
void compileXOn(XOn x, Scope sc)
|
||||
{
|
||||
genCode(new SetX(x.func, true));
|
||||
}
|
||||
void compileXOff(XOff x, Scope sc)
|
||||
{
|
||||
genCode(new SetX(x.func, false));
|
||||
}
|
||||
void compileStatement(Statement i, Scope s)
|
||||
{
|
||||
switch(i.type)
|
||||
@@ -1170,6 +1178,12 @@ class Compiler
|
||||
case NodeType.Swap:
|
||||
compileSwap(cast(Swap)i, s);
|
||||
break;
|
||||
case NodeType.XOn:
|
||||
compileXOn(cast(XOn)i, s);
|
||||
break;
|
||||
case NodeType.XOff:
|
||||
compileXOff(cast(XOff)i, s);
|
||||
break;
|
||||
default:
|
||||
stderr.writeln("Compile:NotImpl ", i.type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user