Example #1
0
 public virtual void addLast(Target target, Expression @value)
 {
     if(targets.Contains(target))
     {
       int index = targets.IndexOf(target);
       targets.RemoveAt(index);
       @value = values[index];
       values.RemoveAt(index);
     }
     targets.Add(target);
     values.Add(@value);
     allnil = allnil && @value.isNil();
 }
 public override void printClosure(Output @out, Target name)
 {
     Decompiler d = new Decompiler(function);
     @out.print("function ");
     if(function.numParams >= 1 && d.declList[0].name.Equals("self") && name is TableTarget)
     {
       name.printMethod(@out);
       printMain(@out, d, false);
     }
     else
     {
       name.print(@out);
       printMain(@out, d, true);
     }
 }
Example #3
0
        public override void printClosure(Output @out, Target name)
        {
            Decompiler d = new Decompiler(function);

            @out.print("function ");
            if (function.numParams >= 1 && d.declList[0].name.Equals("self") && name is TableTarget)
            {
                name.printMethod(@out);
                printMain(@out, d, false);
            }
            else
            {
                name.print(@out);
                printMain(@out, d, true);
            }
        }
Example #4
0
 public SetBlockOperation(int line, Target target, Expression value)
     : base(line)
 {
     _target = target;
     _value = value;
 }
Example #5
0
 public virtual void addFirst(Target target, Expression @value)
 {
     targets.Insert(0, target);
     values.Insert(0, @value);
     allnil = allnil && @value.isNil();
 }
Example #6
0
 public Assignment(Target target, Expression @value)
 {
     targets.Add(target);
     values.Add(@value);
     allnil = allnil && @value.isNil();
 }
Example #7
0
 public virtual void printClosure(Output @out, Target name)
 {
     throw new Exception();
 }