import { CONSTANT_CONTENT, DECLARATION_TYPES } from '../typings/syntaxTypes'; /** * Ensure the value is not undefined * @param argument Anything * @returns Anything, but not undefined * @throws {Typerror} if value is undefined */ export declare function assertNotUndefined(argument: Type | undefined, errorMessage?: string): Exclude; /** * Ensure the argument is not undefined and not equal param * @param argument to check * @param param to compare * @param errorMessage to throw * @returns Argument without undefined type * @throws {Error} if not pass condition */ export declare function assertNotEqual(argument: T | undefined, param: T, errorMessage: string): Exclude; /** * Ensure the argument is true * @param argument to check * @param errorMessage to throw * @returns true * @throws {Error} if expression is false */ export declare function assertExpression(argument: boolean, errorMessage?: string): true; /** * Create a deep copy of one variable. */ export declare function deepCopy(source: T1): T1; /** * Converts a utf-16 string to utf-8 hexstring. Also process escape chars * \n \r \t \\ \' \" \xHH \uHHHH * * @param inStr Input string * @returns Same string converted, padded and reversed. * (multiple of 8 bytes) */ export declare function stringToHexstring(inStr: string, line: string): string; /** * Decode REED-SALOMON signum address from string to long value * Adapted from https://github.com/signum-network/signumj * * @param RSString String without S-, TS- nor BURST- prefix. Invalid * chars are skipped * @param currLine Will be used in throw message if error in decoding * @returns hexstring little endian equivalent for RS address * @throws {Error} on decoding error */ export declare function ReedSalomonAddressDecode(RSString: string, currLine: string): string; /** Parse a string supposed to be a decimal (no negative) * @returns Object with value and type * @throws Error if string is not valid */ export declare function parseDecimalNumber(strNum: string, line: string): CONSTANT_CONTENT; export declare function isDeclarationType(str: string): str is DECLARATION_TYPES; export declare const BitField: { isBlank: number; isDigit: number; isWord: number; isNumber: number; isNumberHex: number; typeTable: number[]; }; export type STREAM_PAIR = { char: string; code: number; }; export declare class StringStream { private _index; private _explodedInput; private _explodedInputCode; private _lastLineLength; private _lastChar; private _line; private _col; constructor(input: string); get line(): number; set line(value: number); get col(): number; set col(value: number); get lineCol(): string; get index(): number; set index(value: number); advance(): STREAM_PAIR; /** Only use for one line string and back() parsing */ setBack(): void; /** Not compatible with advance(), rewind() nor line. Only use for one line string and with setBack() */ back(): STREAM_PAIR; read(): STREAM_PAIR; rewind(): void; testNext(): STREAM_PAIR; EOF(): boolean; }