Esempio n. 1
0
 private void AddCode(ref CodeBlock block, CodePiece code, bool insert = false)
 {
     if (block == null)
         block = new CodeBlock();
     if (block.Codes == null)
         block.Codes = new List<CodePiece>();
     if (insert)
         block.Codes.Insert(0, code);
     else
         block.Codes.Add(code);
 }
Esempio n. 2
0
 public ExitResult Run(CodePiece code)
 {
     ExitResult result = null;
     running.Value = this;
     try
     {
         result = code.Run(this);
     }
     finally
     {
         running.Value = null;
     }
     return result;
 }