Beispiel #1
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            tw.WriteLine("\tcomp1 = {0};", AstNode2.ToString(thread));
            tw.WriteLine("\tcomp2 = {0};", AstNode4.ToString(thread));
            tw.WriteLine("\ttruth_flag = {0};", AstNode3.ToString(thread));

            return(base.ReallyDoEvaluate(thread));
        }
Beispiel #2
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var action = thread.rs().Action.At(Span);

            action.Assign(action.Base().Property("Comp1"), AstNode2.Evaluate(thread) as Operand);
            action.Assign(action.Base().Property("Comp2"), AstNode4.Evaluate(thread) as Operand);
            action.Assign(action.Base().Property("TruthFlag"), AstNode3.Evaluate(thread) as Operand);

            return(base.ReallyDoEvaluate(thread));
        }
Beispiel #3
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            if (AstNode1 is SecondPersonNode)
            {
                var tw = thread.tc().Writer;
                if (AstNode2 is BeNode)
                {
                    if (AstNode3 is ConstantNode)
                    {
                        tw.WriteLine("\t\tAssign({0}, {1});", Location.Line, AstNode3.Evaluate(thread) as string);
                    }
                    else                        // SECOND_PERSON BE Equality Value StatementSymbol
                    {
                        tw.WriteLine("\t\tAssign({0}, {1});", Location.Line, AstNode4.Evaluate(thread) as string);
                    }
                }
                else if (AstNode2 is UnarticulatedConstantNode)
                {
                    tw.WriteLine("\t\tAssign({0}, {1});", Location.Line, AstNode2.Evaluate(thread) as string);
                }
            }

            return(base.ReallyDoEvaluate(thread));
        }
Beispiel #4
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            if (AstNode1 is SecondPersonNode)
            {
                var action = thread.rs().Action.At(Span);
                if (AstNode2 is BeNode)
                {
                    if (AstNode3 is ConstantNode)
                    {
                        action.Invoke(action.Base(), "Assign", Location.Line, AstNode3.Evaluate(thread) as Operand);
                    }
                    else    // SECOND_PERSON BE Equality Value StatementSymbol
                    {
                        action.Invoke(action.Base(), "Assign", Location.Line, AstNode4.Evaluate(thread) as Operand);
                    }
                }
                else if (AstNode2 is UnarticulatedConstantNode)
                {
                    action.Invoke(action.Base(), "Assign", Location.Line, AstNode2.Evaluate(thread) as Operand);
                }
            }

            return(base.ReallyDoEvaluate(thread));
        }