js-slang
Version:
Javascript-based implementations of Source, written in Typescript
12 lines (11 loc) • 529 B
TypeScript
import type { Program } from 'estree';
import { Chapter } from '../../langs';
import type { Context } from '../../types';
import type { AcornOptions, Parser } from '../types';
export declare class PythonParser implements Parser<AcornOptions> {
private chapter;
constructor(chapter: Chapter);
parse(programStr: string, context: Context, options?: Partial<AcornOptions>, throwOnError?: boolean): Program | null;
validate(_ast: Program, _context: Context, _throwOnError: boolean): boolean;
toString(): string;
}