UNPKG

@devicescript/interop

Version:

Interfaces for interaction with DeviceScript files

43 lines 1.43 kB
import { DebugInfo, FunctionDebugInfo, SrcLocation } from "./info"; export interface StackFrame { srcpos: SrcLocation; fn: FunctionDebugInfo; } export declare function parseStackFrame(dbgInfo: DebugInfo, line: string): { markedLine: string; frames: StackFrame[]; }; export declare class SrcMapResolver { dbg: DebugInfo; private fileOff; private fileCache; private pcOff; private pcPos; static from(dbg: DebugInfo): SrcMapResolver; private constructor(); private initPos; resolvePos(pos: number): { fileOff: number; lineOff: number; filepos: number; line: number; col: number; src: import("./info").SrcFile; }; locationToPos(srcIdx: number, line: number, column: number): number; posToString(pos: number): string; private initPc; filePos(srcIdx: number): SrcLocation; srcMapForPos(loc: SrcLocation): SrcMapEntry[]; resolvePc(pc: number): SrcLocation; } export declare function srcLocOverlaps(a: SrcLocation, b: SrcLocation): boolean; export interface SrcMapEntry { pos: number; end: number; pc: number; } export declare function filterOverlapping(arr: SrcMapEntry[], loc: SrcLocation): SrcMapEntry[]; export declare function toTable(header: string[], rows: (string | number)[][]): string; export declare function computeSizes(dbg: DebugInfo): string; //# sourceMappingURL=debug.d.ts.map