|
@@ -270,6 +270,41 @@ class CodeBox {
|
|
|
case "#":
|
|
|
this.OmniMirror();
|
|
|
break;
|
|
|
+ // Stack manipulation
|
|
|
+ case ":":
|
|
|
+ this.stack.Duplicate();
|
|
|
+ break;
|
|
|
+ case "~":
|
|
|
+ this.stack.Remove();
|
|
|
+ break;
|
|
|
+ case "$":
|
|
|
+ this.stack.SwapTwo();
|
|
|
+ break;
|
|
|
+ // case "@":
|
|
|
+ // this.stack.SwapThree();
|
|
|
+ // break;
|
|
|
+ case "{":
|
|
|
+ this.stack.ShiftLeft();
|
|
|
+ break;
|
|
|
+ case "}":
|
|
|
+ this.stack.ShiftRight();
|
|
|
+ break;
|
|
|
+ case "r":
|
|
|
+ this.stack.Reverse();
|
|
|
+ break;
|
|
|
+ case "l":
|
|
|
+ this.stack.PushLength();
|
|
|
+ break;
|
|
|
+ // case "[":
|
|
|
+ // break;
|
|
|
+ // case "]":
|
|
|
+ // break;
|
|
|
+ // case "I":
|
|
|
+ // this.curr_stack++;
|
|
|
+ // break;
|
|
|
+ // case "D":
|
|
|
+ // this.curr_stack--;
|
|
|
+ // break;
|
|
|
// Output
|
|
|
case "n":
|
|
|
output = this.stack.Pop();
|