UNPKG

ton-assembly

Version:
21 lines 1 kB
import type * as G from "../parse/grammar"; import { $ast } from "../parse/grammar"; import type { $ast as $astT } from "../../text/grammar"; import type { DecompiledMethod } from "../../runtime/util"; import type { Instr } from "../../runtime"; export declare function compile(sourceName: string, content: string): Instr[]; export interface CompilationContext { readonly functions: ReadonlyMap<string, number>; readonly globals: ReadonlyMap<string, number>; readonly compiledFunctions: Map<string, CompiledDefinition>; readonly usedFunctions: Map<string, number>; } export declare function processAst(ast: G.$ast.SourceFile): CompilationContext; interface CompiledDefinition { readonly inline: "inline" | "inline_ref" | "unspecified"; readonly compiled: DecompiledMethod; readonly processed: $astT.Instruction[]; } export declare function compileDefinition(def: $ast.Definition, ctx: CompilationContext): CompiledDefinition; export {}; //# sourceMappingURL=compile.d.ts.map