import { Type, Symbol } from './types'; import { ParseTree } from './parser'; import { EventSubscription } from './event'; export declare const EntryPoint = "$v"; export declare type APIs = ([string, string, string] | [string, string, string, any])[]; export declare const VargNumber: { vargType: Type; }; export declare const VargAny: { vargType: Type; }; declare type Player = { start: () => void; stop: () => void; pause: () => void; resume: () => void; }; export declare class Context { vars: any; players: Player[]; events: EventSubscription; codemap: ParseTree[]; constructor(events: EventSubscription | undefined, codemap: ParseTree[]); addPlayer(play: Player): void; start(): void; pause(): void; resume(): void; stop(): void; ffiCall(name: string, ...args: any[]): any; } export declare class Language { uniqueModuleId: number; names: string[]; defaultModules: Module[]; installedModules: { [key: string]: Module; }; constructor(...defs: [string, Module][]); installModule(name: string, module: Module): void; initDefaultModules(): Module[]; loadModule(name: string): Module; findModuleFromSymbol(name: string): string | undefined; static rewriteNameSpace: (key: string, code: string) => string; static rewriteParamSize: (code: string, oldSize: number, newSize: number) => string; static symbolMap: (module: Module, names?: { [key: string]: string; } | undefined) => { [key: string]: Symbol; }; } export declare class Module { __name__: string; __entryKey__: string; __symbols__: APIs; __context__: Context | undefined; constructor(name: string, symbols: APIs); __init__(cx: Context): void; __raise__(key: string, cmap: number | undefined, options?: any): void; } export declare type SourceEvent = { key: string; source: ParseTree; }; export declare type Main = (cx: any) => IterableIterator; export declare const generate: (source: string) => Main; export declare class Code { symbols: any; modules: Module[]; codemap: ParseTree[]; errors: SourceEvent[]; source: string; compiled: string; main: Main | undefined; newContext(event?: EventSubscription): Context; getExecutable(): Main; } export {};