Predefined C# type aliases: int → System.Int32, etc. */
| 164 | |
| 165 | /* Predefined C# type aliases: int → System.Int32, etc. */ |
| 166 | static const char *cs_predefined_alias(const char *name) { |
| 167 | if (!name) return NULL; |
| 168 | /* Roslyn predefined-type list: Binder_Symbols.cs BindPredefinedTypeSymbol */ |
| 169 | if (strcmp(name, "int") == 0) return "System.Int32"; |
| 170 | if (strcmp(name, "uint") == 0) return "System.UInt32"; |
| 171 | if (strcmp(name, "long") == 0) return "System.Int64"; |
| 172 | if (strcmp(name, "ulong") == 0) return "System.UInt64"; |
| 173 | if (strcmp(name, "short") == 0) return "System.Int16"; |
| 174 | if (strcmp(name, "ushort") == 0) return "System.UInt16"; |
| 175 | if (strcmp(name, "byte") == 0) return "System.Byte"; |
| 176 | if (strcmp(name, "sbyte") == 0) return "System.SByte"; |
| 177 | if (strcmp(name, "float") == 0) return "System.Single"; |
| 178 | if (strcmp(name, "double") == 0) return "System.Double"; |
| 179 | if (strcmp(name, "decimal") == 0) return "System.Decimal"; |
| 180 | if (strcmp(name, "bool") == 0) return "System.Boolean"; |
| 181 | if (strcmp(name, "char") == 0) return "System.Char"; |
| 182 | if (strcmp(name, "string") == 0) return "System.String"; |
| 183 | if (strcmp(name, "object") == 0) return "System.Object"; |
| 184 | if (strcmp(name, "nint") == 0) return "System.IntPtr"; |
| 185 | if (strcmp(name, "nuint") == 0) return "System.UIntPtr"; |
| 186 | if (strcmp(name, "void") == 0) return "System.Void"; |
| 187 | if (strcmp(name, "dynamic") == 0) return "System.Object"; /* dynamic ≈ object */ |
| 188 | return NULL; |
| 189 | } |
| 190 | |
| 191 | static bool cs_is_keyword_self(const char *name) { |
| 192 | if (!name) return false; |
no outgoing calls
no test coverage detected