Пример #1
0
 public override void Execute(NetStack stack)
 {
     dynamic r = stack.Pop();
     dynamic l = stack.Pop();
     stack.Push(l + r);
     //throw new ArgumentException(string.Format("Cannot add operands of type {0} and {1}", l.GetType().Name, r.GetType().Name));
 }
Пример #2
0
 public override void Execute(NetStack stack)
 {
     stack.Push(this);
 }
Пример #3
0
 public override void Execute(NetStack stack)
 {
     Console.Write("input> ");
     stack.Push(Console.ReadLine());
 }
Пример #4
0
 public override void Execute(NetStack stack)
 {
     var label = stack.Pop<string>();
     stack.Push(new FunctionLabel(label));
 }
Пример #5
0
 public override void Execute(NetStack stack)
 {
     var top = stack.Pop();
     var bottom = stack.Pop();
     stack.Push(top).Push(bottom);
 }
Пример #6
0
 public override void Execute(NetStack stack)
 {
     dynamic r = stack.Pop();
     dynamic l = stack.Pop();
     stack.Push(l > r);
 }
Пример #7
0
 public override void Execute(NetStack stack)
 {
     var l = stack.Pop();
     var r = stack.Pop();
     stack.Push(l.Equals(r));
 }
Пример #8
0
 public override void Execute(NetStack stack)
 {
     stack.Push(stack.Pop<long>() - 1);
 }
Пример #9
0
 public override void Execute(NetStack stack)
 {
     var val = stack.Pop();
     stack.Push(val).Push(val);
 }
Пример #10
0
 public override void Execute(NetStack stack)
 {
     stack.Push(value);
 }
Пример #11
0
 public override void Execute(NetStack stack)
 {
     dynamic variable = stack.Pop();
     stack.Push(++variable);
 }
Пример #12
0
 public override void Execute(NetStack stack)
 {
     var offset = stack.Pop<long>();
     var value = stack.Peek(offset);
     stack.Push(value);
 }
Пример #13
0
 public override void Execute(NetStack stack)
 {
     stack.Push(new Parser().Parse(stack.Pop<string>()));
 }