INNER CODE UNIT · TypeScript

Tokenizer

postalsys/postal-mime · src/address-parser.ts:304

class Tokenizer {
    str: string;
    operatorCurrent: string;
    operatorExpecting: string;
    node: Token | null;
    escaped: boolean;
    list: Token[];
    /**
     * Operator tokens and which tokens are expected to end the sequence
     */
    operators: Record<string, string>;

    /**
     * @param str Address field string
     */
    constructor(str: string) {
        this.str = (str || '').toString();
        this.operatorCurrent = '';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…