python2igcse
Version:
Convert Python code to IGCSE Pseudocode format
123 lines • 3.45 kB
TypeScript
export { convertPythonToIGCSE, Converter } from './converter';
export { CLI } from './cli';
export { Converter as PythonToIGCSEConverter } from './converter';
import { Converter } from './converter';
export { BaseParser, PythonParser, PythonASTVisitor, createParser } from './parser';
export { BaseEmitter, TextEmitter, MarkdownEmitter, createEmitter, EmitterUtils } from './emitter';
export * from './types';
export { VERSION, SUPPORTED_PYTHON_VERSION, IGCSE_SPEC_VERSION } from './types';
/**
* Quick conversion function for simple use cases
*/
export declare function convertPython(pythonCode: string): Promise<string>;
/**
* Default converter instance for quick usage
*/
export declare const defaultConverter: {
converter: Converter;
/**
* Quick conversion with default options
*/
convert(pythonCode: string): Promise<import("./types").ConversionResult>;
/**
* Convert to markdown format
*/
convertToMarkdown(pythonCode: string): Promise<import("./types").ConversionResult>;
/**
* Convert with custom options
*/
convertWithOptions(pythonCode: string, options: import("./types").ConversionOptions): Promise<import("./types").ConversionResult>;
};
/**
* Utility functions for common use cases
*/
export declare const utils: {
/**
* Create a converter with preset configurations
*/
createConverter: {
/**
* Converter optimized for educational use
*/
educational: () => Converter;
/**
* Converter optimized for markdown documentation
*/
documentation: () => Converter;
/**
* Converter with compact output
*/
compact: () => Converter;
/**
* Converter with strict validation
*/
strict: () => Converter;
};
/**
* Validation utilities
*/
validate: {
/**
* Check if Python code is suitable for IGCSE conversion
*/
isPythonCodeSuitable(pythonCode: string): Promise<{
suitable: boolean;
issues: string[];
suggestions: string[];
}>;
/**
* Get complexity analysis of Python code
*/
analyzeComplexity(pythonCode: string): Promise<{
complexity: "low" | "medium" | "high";
metrics: {
lines: number;
functions: number;
loops: number;
conditionals: number;
nestingDepth: number;
};
recommendations: string[];
}>;
};
/**
* Format utilities
*/
format: {
/**
* Format code for different educational contexts
*/
forExam: (code: string) => string;
/**
* Format code for textbook inclusion
*/
forTextbook: (code: string) => string;
/**
* Format code for presentation slides
*/
forSlides: (code: string) => string;
};
};
/**
* Quick start examples
*/
export declare const examples: {
/**
* Basic variable assignment
*/
basicAssignment: string;
/**
* Simple function
*/
simpleFunction: string;
/**
* Loop example
*/
simpleLoop: string;
/**
* Conditional example
*/
simpleConditional: string;
};
export { Converter as default } from './converter';
//# sourceMappingURL=index.d.ts.map