public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     if ( new TLBit( command.ParamExpression.Evaluate( scope ) ).Value )
         thread.EnterBlock( command.InnerBlock );
     else
         thread.Advance();
 }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            scope.Declare( command.Identifier,
                new TLSub( command.InnerBlock, scope ) );

            thread.Advance();
        }
 public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     do
         thread.Advance();
     while ( thread.CurrentCommand != null && (
         thread.CurrentCommand.CommandType is CmdEls ||
         thread.CurrentCommand.CommandType is CmdEif ) );
 }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            scope[ command.Identifier ] =
                TLObject.Convert( scope[ command.Identifier ].GetType(),
                command.ParamExpression.Evaluate( scope ) );

            thread.Advance();
        }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLSub sub = scope[ command.ParamIdentifiers[ 0 ] ] as TLSub;

            Thread newThread = new Thread( sub.Block, sub.Scope );
            scope.Declare( command.Identifier, new TLThr( newThread ) );
            ThreadLang.StartThread( newThread );

            thread.Advance();
        }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLStr stream = ( command.ParamExpression.Evaluate( scope ) as TLStr );

            if ( stream.DataWaiting )
            {
                scope[ command.Identifier ] =
                    ( command.ParamExpression.Evaluate( scope ) as TLStr ).Read();

                thread.Advance();
            }
        }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            if ( command.ParamExpression != null )
            {
                scope.Declare( command.Identifier,
                    new TLStr( command.ParamExpression.Evaluate( scope ) ) );
            }
            else
                scope.Declare( command.Identifier, new TLStr() );

            thread.Advance();
        }
        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLObject val = command.ParamExpression.Evaluate( scope );
            TLStr str = scope[ command.Identifier ] as TLStr;

            if ( val is TLByt )
                str.Write( val as TLByt );
            else
            {
                TLStr data = ( val as TLStr );
                while ( data.DataWaiting )
                    str.Write( data.Read() );
            }

            thread.Advance();
        }
 public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     thread.Advance();
 }