Exemplo n.º 1
0
 public void Read(byte[] bytes)
 {
     using (var io = IoBuffer.FromBytes(bytes, ByteOrder.LITTLE_ENDIAN)){
         LhsData  = io.ReadUInt16();
         RhsData  = io.ReadUInt16();
         IsSigned = io.ReadByte();
         Operator = (VMExpressionOperator)io.ReadByte();
         LhsOwner = (VMVariableScope)io.ReadByte();
         RhsOwner = (VMVariableScope)io.ReadByte();
     }
 }
Exemplo n.º 2
0
 private string OperatorToString(VMExpressionOperator op)
 {
     switch (op){
         case VMExpressionOperator.AndEquals:
             return "&=";
         case VMExpressionOperator.Assign:
             return "=";
         case VMExpressionOperator.ClearFlag:
             return "clearFlag";
         case VMExpressionOperator.DivEquals:
             return "/=";
         case VMExpressionOperator.Equals:
             return "==";
         case VMExpressionOperator.GreaterThan:
             return ">";
         case VMExpressionOperator.GreaterThanOrEqualTo:
             return ">=";
         case VMExpressionOperator.IncAndLessThan:
             return "++ & <";
         case VMExpressionOperator.IsFlagSet:
             return "flagSet";
         case VMExpressionOperator.LessThan:
             return "<";
         case VMExpressionOperator.LessThanOrEqualTo:
             return "<=";
         case VMExpressionOperator.DecAndGreaterThan:
             return "-- & >";
         case VMExpressionOperator.MinusEquals:
             return "-=";
         case VMExpressionOperator.ModEquals:
             return "%=";
         case VMExpressionOperator.MulEquals:
             return "*=";
         case VMExpressionOperator.NotEqualTo:
             return "!=";
         case VMExpressionOperator.PlusEquals:
             return "+=";
         case VMExpressionOperator.Pop:
             return "pop";
         case VMExpressionOperator.Push:
             return "push";
         case VMExpressionOperator.SetFlag:
             return "setFlag";
     }
     return "unknown";
 }
Exemplo n.º 3
0
        private string OperatorToString(VMExpressionOperator op)
        {
            switch (op)
            {
            case VMExpressionOperator.AndEquals:
                return("&=");

            case VMExpressionOperator.Assign:
                return("=");

            case VMExpressionOperator.ClearFlag:
                return("clearFlag");

            case VMExpressionOperator.DivEquals:
                return("/=");

            case VMExpressionOperator.Equals:
                return("==");

            case VMExpressionOperator.GreaterThan:
                return(">");

            case VMExpressionOperator.GreaterThanOrEqualTo:
                return(">=");

            case VMExpressionOperator.IncAndLessThan:
                return("++ & <");

            case VMExpressionOperator.IsFlagSet:
                return("flagSet");

            case VMExpressionOperator.LessThan:
                return("<");

            case VMExpressionOperator.LessThanOrEqualTo:
                return("<=");

            case VMExpressionOperator.DecAndGreaterThan:
                return("-- & >");

            case VMExpressionOperator.MinusEquals:
                return("-=");

            case VMExpressionOperator.ModEquals:
                return("%=");

            case VMExpressionOperator.MulEquals:
                return("*=");

            case VMExpressionOperator.NotEqualTo:
                return("!=");

            case VMExpressionOperator.PlusEquals:
                return("+=");

            case VMExpressionOperator.Pop:
                return("pop");

            case VMExpressionOperator.Push:
                return("push");

            case VMExpressionOperator.SetFlag:
                return("setFlag");
            }
            return("unknown");
        }
Exemplo n.º 4
0
 public void Read(byte[] bytes)
 {
     using (var io = IoBuffer.FromBytes(bytes, ByteOrder.LITTLE_ENDIAN)){
         LhsData = io.ReadUInt16();
         RhsData = io.ReadUInt16();
         IsSigned = io.ReadByte();
         Operator = (VMExpressionOperator)io.ReadByte();
         LhsOwner = (VMVariableScope)io.ReadByte();
         RhsOwner = (VMVariableScope)io.ReadByte();
     }
 }