コード例 #1
0
 public BinaryExpression(Expression left, Expression right, BinaryOperation operation, MjoType type)
 {
     Left      = left;
     Right     = right;
     Operation = operation;
     Type      = type;
 }
コード例 #2
0
ファイル: Assignment.cs プロジェクト: AtomCrafty/MajiroTools
 public Assignment(Expression value, uint hash, MjoFlags flags, MjoType type, BinaryOperation operation)
 {
     Value     = value;
     Hash      = hash;
     Flags     = flags;
     Type      = type;
     Operation = operation;
 }
コード例 #3
0
 private void ProcessBinaryExpression(Instruction instruction, BinaryOperation operation, MjoType type)
 {
     Debug.Assert(EvaluationStack.Count >= 2);
     var left  = EvaluationStack[^ 2];
コード例 #4
0
 public static MjoFlags Build(MjoType type, MjoScope scope, MjoModifier modifier, MjoInvertMode invertMode, int dimension) =>
 (MjoFlags)(dimension << 11 | (ushort)type << 8 | (ushort)scope << 5 | (ushort)invertMode << 3 | (ushort)modifier);
コード例 #5
0
 public static MjoType ElementType(this MjoType type) => type.Matches(MjoTypeMask.Array)
                 ? type - 3
                 : throw new Exception($"Can't resolve element type of {type}");
コード例 #6
0
 public static MjoType Array(this MjoType type) => type.Matches(MjoTypeMask.Primitive)
                 ? type + 3
                 : throw new Exception($"Can't create array type from {type}");
コード例 #7
0
 public static bool Matches(this MjoType type, MjoTypeMask mask) => type == MjoType.Unknown || (type.ToMask() & mask) != 0;
コード例 #8
0
 public static MjoTypeMask ToMask(this MjoType type) => type == MjoType.Unknown ? MjoTypeMask.All : (MjoTypeMask)(1 << (byte)type);
コード例 #9
0
 public UnaryExpression(Expression operand, UnaryOperation operation, MjoType type)
 {
     Operand   = operand;
     Operation = operation;
     Type      = type;
 }
コード例 #10
0
 public ArrayAssignment(Expression value, Expression[] indices, uint hash, MjoFlags flags, MjoType type, BinaryOperation operation)
     : base(value, hash, flags, type, operation)
 {
     Indices = indices;
 }
コード例 #11
0
ファイル: Cast.cs プロジェクト: AtomCrafty/MajiroTools
 public Cast(Expression value, MjoType targetType)
 {
     Value      = value;
     TargetType = targetType;
 }