watr
Version:
Light & fast WAT compiler – WebAssembly Text to binary, parse, print, transform
20 lines • 873 B
TypeScript
/**
* Throws an error with optional source position.
* Uses err.src for source and err.loc for default position.
* If pos provided or err.loc set, appends "at line:col".
*
* @param {string} text - Error message
* @param {number} [pos] - Byte offset in source (defaults to err.loc)
* @throws {Error}
*/
export const err: (text: string, pos?: number) => never;
/** Regex to detect invalid underscore placement in numbers */
export const sepRE: RegExp;
/** Regex to match valid integer literals (decimal or hex) */
export const intRE: RegExp;
export function str(s: string): number[];
export function unescape(s: string): string;
export function clone(node: any): any;
export function walk(node: any, fn: Function, parent?: any, idx?: number): void;
export function walkPost(node: any, fn: Function, parent?: any, idx?: number): any;
//# sourceMappingURL=util.d.ts.map