private static IEnumerable <UnaryOperatorSignature> GetBuiltInSignatures(UnaryOperatorKind kind) { switch (kind) { case UnaryOperatorKind.Plus: return(BuiltInIdentitySignatures); case UnaryOperatorKind.Minus: return(BuiltInNegationSignatures); case UnaryOperatorKind.BitwiseNot: return(BuiltInBitwiseNotSignatures); case UnaryOperatorKind.LogicalNot: return(BuiltInLogicalNotSignatures); case UnaryOperatorKind.PostDecrement: return(BuiltInPostDecrementSignatures); case UnaryOperatorKind.PostIncrement: return(BuiltInPostIncrementSignatures); case UnaryOperatorKind.PreDecrement: return(BuiltInPreDecrementSignatures); case UnaryOperatorKind.PreIncrement: return(BuiltInPreIncrementSignatures); default: throw new ArgumentOutOfRangeException(nameof(kind), kind.ToString()); } }
private static IEnumerable<UnaryOperatorSignature> GetBuiltInSignatures(UnaryOperatorKind kind) { switch (kind) { case UnaryOperatorKind.Plus: return BuiltInIdentitySignatures; case UnaryOperatorKind.Minus: return BuiltInNegationSignatures; case UnaryOperatorKind.BitwiseNot: return BuiltInBitwiseNotSignatures; case UnaryOperatorKind.LogicalNot: return BuiltInLogicalNotSignatures; case UnaryOperatorKind.PostDecrement: return BuiltInPostDecrementSignatures; case UnaryOperatorKind.PostIncrement: return BuiltInPostIncrementSignatures; case UnaryOperatorKind.PreDecrement: return BuiltInPreDecrementSignatures; case UnaryOperatorKind.PreIncrement: return BuiltInPreIncrementSignatures; default: throw new ArgumentOutOfRangeException(nameof(kind), kind.ToString()); } }
public static UnaryOperatorNodeModel CreateUnaryOperatorNode(this IGraphModel graphModel, UnaryOperatorKind kind, Vector2 position, SpawnFlags spawnFlags = SpawnFlags.Default, GUID?guid = null) { return(graphModel.CreateNode <UnaryOperatorNodeModel>(kind.ToString(), position, spawnFlags, n => n.Kind = kind, guid)); }
public static UnaryOperatorNodeModel CreateUnaryStatementNode(this IStackModel stackModel, UnaryOperatorKind kind, int index, SpawnFlags spawnFlags = SpawnFlags.Default, GUID?guid = null) { return(stackModel.CreateStackedNode <UnaryOperatorNodeModel>(kind.ToString(), index, spawnFlags, n => n.Kind = kind, guid)); }
public static UnaryOperatorNodeModel CreateUnaryOperatorNode(this VSGraphModel graphModel, UnaryOperatorKind kind, Vector2 position, SpawnFlags spawnFlags = SpawnFlags.Default) { return(graphModel.CreateModel <UnaryOperatorNodeModel>(kind.ToString(), position, spawnFlags, n => n.kind = kind)); }
public static UnaryOperatorNodeModel CreateUnaryStatementNode(this StackBaseModel stackModel, UnaryOperatorKind kind, int index, SpawnFlags spawnFlags = SpawnFlags.Default) { return(CreateStackedNode <UnaryOperatorNodeModel>(stackModel, kind.ToString(), index, spawnFlags, n => n.kind = kind)); }
public static string GetKeyword(this UnaryOperatorKind @enum) { switch (@enum) { case UnaryOperatorKind.Negate: return(Symbols.Operators.Minus); case UnaryOperatorKind.Not: return(Keywords.Operators.NOT); default: throw new NotSupportedByMappingStackException($"UNKNOWN_UNARY_OPERATOR: {@enum.ToString()}"); } }