internal static LNullable GetForTypeSymbol(TypeSymbol ts) { switch (ts.Kind) { case TypeSymbol.TypeKind.ARRAY: return(new LArray(null, true)); case TypeSymbol.TypeKind.POINTER: case TypeSymbol.TypeKind.STRUCT: if (ts.Name == "string") { return(new LString(null, true)); } LStruct struc = new LStruct(null, ts.Name, true); return(struc); } throw new Exception("Not-Nullable type called Nullable? : " + ts.ToString()); }
public override LData VisitNewStructNode(NewStructNode n) { var struc = new LStruct(n.Type.Fields, n.Type); return(struc); }