UNPKG

motoko

Version:

Compile and run Motoko smart contracts in Node.js or the browser.

30 lines 1.01 kB
export declare type CompilerAST = CompilerAST[] | CompilerNode | string | null; export declare type CompilerSpan = { name: 'Pos'; args: [string, string, string]; }; export interface CompilerNode { name: string; args: CompilerAST[]; } export declare type Span = [number, number]; export declare type AST = AST[] | Node | string | null; export interface Source { file: string; start: Span; end: Span; } export interface Node extends Partial<Source> { parent?: Node | undefined; name: string; type?: string; typeRep?: Node; doc?: string; declaration?: Source; args?: AST[]; } export declare function asNode(ast: AST | undefined): Node | undefined; export declare function simplifyAST(ast: CompilerNode, parent?: Node | undefined): Node; export declare function simplifyAST(ast: CompilerAST[], parent?: Node | undefined): AST[]; export declare function simplifyAST<T extends CompilerAST>(ast: T, parent?: Node | undefined): T; //# sourceMappingURL=ast.d.ts.map