MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cs_predefined_alias

Function cs_predefined_alias

internal/cbm/lsp/cs_lsp.c:166–189  ·  view source on GitHub ↗

Predefined C# type aliases: int → System.Int32, etc. */

Source from the content-addressed store, hash-verified

164
165/* Predefined C# type aliases: int → System.Int32, etc. */
166static 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
191static bool cs_is_keyword_self(const char *name) {
192 if (!name) return false;

Callers 3

cs_resolve_type_nameFunction · 0.85
cs_parse_type_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected