Ejemplo n.º 1
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            tw.Write(format, Location.Line, AstNode2.ToString(thread), AstNode3.ToString(thread));
            return(this);
        }
Ejemplo n.º 2
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            tw.WriteLine("\tpush({0}, second_person, {1});", Location.Line, AstNode2.ToString(thread));

            return(this);
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
0
 protected override object ReallyDoEvaluate(ScriptThread thread)
 {
     if (AstNode1 is NegativeNounNode)
     {
         return("(-1)");
     }
     else             // astnode1 is NegativeAdjective or astnode1 is neutralAdjective
     {
         return(string.Format("2*{0}", AstNode2.ToString(thread)));
     }
 }
Ejemplo n.º 5
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            Context.CurrentAct = actnumber;

            var tw = thread.tc().Writer;

            tw.WriteLine();
            tw.Write((Context.CurrentAct + ":").PadRight(Constant.COMMENT_COLUMN));
            tw.WriteLine(AstNode2.ToString(thread));

            return(this);
        }
Ejemplo n.º 6
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            if (AstNode2 is SceneRomanNode)
            {
                tw.WriteLine("\tgoto {0}_{1};", Context.CurrentAct, AstNode2.ToString().str2varname());
            }
            else
            {
                tw.WriteLine("\tgoto {0};", AstNode2.ToString().str2varname());
            }

            return(this);
        }
Ejemplo n.º 7
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            string label;

            if (AstNode2 is SceneRomanNode)
            {
                label = Context.CurrentAct + "_" + AstNode2.ToString(thread).str2varname();
            }
            else
            {
                label = AstNode2.ToString(thread).str2varname();
            }

            thread.rs().Action.At(Span).Goto(label);

            return(base.ReallyDoEvaluate(thread));
        }
Ejemplo n.º 8
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            Context.CurrentScene = Context.CurrentAct + "_" + scenenumber;
            tw.WriteLine("{0}{1}", (Context.CurrentScene + ":").PadRight(Constant.COMMENT_COLUMN), AstNode2.ToString(thread));
            return(this);
        }
Ejemplo n.º 9
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("\tassign({0}, second_person, {1});", Location.Line, AstNode3.ToString(thread));
                    }
                    else    // SECOND_PERSON BE Equality Value StatementSymbol
                    {
                        tw.WriteLine("\tassign({0}, second_person, {1});", Location.Line, AstNode4.ToString(thread));
                    }
                }
                else if (AstNode2 is UnarticulatedConstantNode)
                {
                    tw.WriteLine("\tassign({0}, second_person, {1});", Location.Line, AstNode2.ToString(thread));
                }
            }

            return(base.ReallyDoEvaluate(thread));
        }
Ejemplo n.º 10
0
        protected override object ReallyDoEvaluate(ScriptThread thread)
        {
            var tw = thread.tc().Writer;

            tw.WriteLine("\t\tCharacter\t{0} = InitializeCharacter({2},\"{0}\");\t\t{1}", AstNode1.ToString(thread), AstNode2.ToString(thread), Location.Line);
            return(this);
        }