UNPKG

puppy-transpiler

Version:
42 lines (41 loc) 1.01 kB
export declare class Type { protected code: string; constructor(code: string); isOptional(): boolean; getValue(): string; toString(): string; rtype(): Type; psize(): number; ptype(index: number): Type; accept(ty: Type, update: boolean): boolean; realType(): Type; isPattern(): boolean; hasAlpha(): boolean; toVarType(map: any): Type; } export declare type ErrorLog = { type?: string; key: string; pos?: number; row?: number; col?: number; len?: number; subject?: string; code?: string; request?: Type; given?: Type; fix?: string; }; export declare type Source = { source: string; lang?: string; }; export declare type PuppyCode = { world: any; main: (puppy: any) => IterableIterator<number>; errors: ErrorLog[]; code: string; }; export declare const compile: (s: Source) => PuppyCode; export declare const puppy_version: () => string; export declare const utest: (s: string) => string;