python2ib
Version:
Convert Python code to IB Pseudocode format
29 lines • 1.15 kB
TypeScript
/**
* Main parser entry point for Python to IB Pseudocode conversion
*/
import { IR } from '../types/ir.js';
import { ConvertOptions } from '../types/config.js';
/** Main parser class */
export declare class Parser {
private astParser;
private visitor;
constructor(options?: ConvertOptions);
/** Parse Python code and convert to IR */
parse(pythonCode: string): Promise<IR>;
/** Parse Python code synchronously (for simple cases) */
parseSync(pythonCode: string): IR;
/** Validate Python syntax without full parsing */
validateSyntax(pythonCode: string): {
isValid: boolean;
errors: string[];
};
/** Get supported Python constructs */
getSupportedConstructs(): string[];
/** Get unsupported Python constructs */
getUnsupportedConstructs(): string[];
}
/** Convenience function for quick parsing */
export declare function parsePython(pythonCode: string, options?: ConvertOptions): Promise<IR>;
/** Convenience function for synchronous parsing */
export declare function parsePythonSync(pythonCode: string, options?: ConvertOptions): IR;
//# sourceMappingURL=index.d.ts.map