Beispiel #1
0
 private static string TypeOf(ValueType type)
 {
     return(type.Match().Returning <string>()
            .With <VoidType>(voidType => "void")
            .With <IntType>(intType =>
     {
         var coreType = intType.IsSigned ? "int" : "uint";
         return $"{coreType}{intType.BitLength}_t";
     })
            .Exhaustive());
 }
 public ReferenceType(ReferenceTypeSyntax syntax, Package containingPackage, ValueType type)
     : base(syntax, containingPackage)
 {
     IsOwned = syntax.IsOwned ?? false; // TODO actually infer ownership
     Type = type;
 }