UNPKG

@casual-simulation/aux-runtime

Version:
23 lines 850 B
export interface CodeLocation { /** * The zero based line number that the location represents. */ lineNumber: number; /** * The zero based column number that the location represents. */ column: number; } /** * Calculates the character index that the given location occurrs at in the given string. * @param code The string. * @param location The location to get the index of. LIne and column numbers are zero-based. */ export declare function calculateIndexFromLocation(code: string, location: CodeLocation): number; /** * Calculates the line and column number that the given index occurrs at in the given string. * @param code The code. * @param index The index. */ export declare function calculateLocationFromIndex(code: string, index: number): CodeLocation; //# sourceMappingURL=TranspilerUtils.d.ts.map