public static UnifiedRange CreateNotContainingMax( UnifiedExpression min = null, UnifiedExpression max = null) { return(new UnifiedRange { Min = min, Max = UnifiedBinaryExpression.Create( max, UnifiedBinaryOperator.Create( "-", UnifiedBinaryOperatorKind.Subtract), UnifiedIntegerLiteral.CreateInt32(-1)), }); }
public static UnifiedVariableDefinition Create( UnifiedSet <UnifiedAnnotation> annotations = null, UnifiedSet <UnifiedModifier> modifiers = null, UnifiedType type = null, UnifiedIdentifier name = null, UnifiedExpression initialValue = null, UnifiedSet <UnifiedArgument> arguments = null, UnifiedIntegerLiteral bitField = null, UnifiedBlock body = null) { return(new UnifiedVariableDefinition { Annotations = annotations, Arguments = arguments, BitField = bitField, Body = body, InitialValue = initialValue, Modifiers = modifiers, Name = name, Type = type, }); }