il2cpp-dump-analyzer-mcp
Version:
Agentic RAG system for analyzing IL2CPP dump.cs files from Unity games
87 lines (86 loc) • 2.31 kB
TypeScript
/**
* Utility functions for IL2CPP code generation
* Provides common functionality for naming conventions, formatting, and validation
*/
import { FileNamingConvention, CodeStyleOptions, ValidationResult, TypeResolver, GenerationUtils } from './types';
/**
* Implementation of GenerationUtils interface
*/
export declare class CodeGenerationUtils implements GenerationUtils {
/**
* Convert string to specified naming convention
*/
toNamingConvention(str: string, convention: FileNamingConvention): string;
/**
* Generate XML documentation comment
*/
generateXmlDoc(description: string, parameters?: string[], returns?: string): string;
/**
* Format code according to style options
*/
formatCode(code: string, style: CodeStyleOptions): string;
/**
* Validate generated C# code syntax (basic implementation)
*/
validateCSharpSyntax(code: string): ValidationResult;
/**
* Capitalize first letter of a word
*/
private capitalize;
/**
* Wrap long lines
*/
private wrapLine;
/**
* Check brace balance in a line
*/
private checkBraceBalance;
/**
* Check for missing semicolons
*/
private checkSemicolons;
/**
* Check for C# keyword usage
*/
private checkKeywords;
/**
* Check naming conventions
*/
private checkNamingConventions;
/**
* Check overall brace balance in code
*/
private checkOverallBraceBalance;
}
/**
* Implementation of TypeResolver interface for IL2CPP types
*/
export declare class IL2CPPTypeResolver implements TypeResolver {
private typeMap;
private unityTypes;
constructor();
/**
* Resolve IL2CPP type to C# type
*/
resolveType(il2cppType: string): string;
/**
* Check if type is Unity-specific
*/
isUnityType(type: string): boolean;
/**
* Get using statements for type
*/
getUsingsForType(type: string): string[];
/**
* Resolve generic type parameters
*/
resolveGenericType(type: string, genericArgs: string[]): string;
/**
* Initialize IL2CPP to C# type mappings
*/
private initializeTypeMappings;
/**
* Initialize Unity-specific types
*/
private initializeUnityTypes;
}