Run() public method

public Run ( ) : Value
return Value
Ejemplo n.º 1
0
        public override Value Operate(Value First, Value Second)
        {
            if (First is Reference)
            {
                First = (First as Reference).ReferencingValue;
            }
            if (Second is Reference)
            {
                Second = (Second as Reference).ReferencingValue;
            }

            if (First is Array && (First as Array).Arr.Count == 0 && Second is CodeBlock)
            {
                var newType = new Type((Second as CodeBlock));
                newType.Run();
                return(newType);
            }
            if (First is Type && Second is CodeBlock)
            {
                var newType = new Type((First as Type), (Second as CodeBlock));
                return(newType.Run());
            }
            throw new Exception("First operand must be a type or an empty list and the second operand must bea code block");
        }
Ejemplo n.º 2
0
        public override Value Operate( Value First, Value Second )
        {
            if ( First is Reference ) First = ( First as Reference ).ReferencingValue;
            if ( Second is Reference ) Second = ( Second as Reference ).ReferencingValue;

            if ( First is Array && ( First as Array ).Arr.Count == 0 && Second is CodeBlock )
            {
                var newType = new Type( ( Second as CodeBlock ) );
                newType.Run();
                return newType;
            }
            if ( First is Type && Second is CodeBlock )
            {
                var newType = new Type( ( First as Type ), ( Second as CodeBlock ) );
                return newType.Run();
            }
            throw new Exception( "First operand must be a type or an empty list and the second operand must bea code block" );
        }