Traqula
    Preparing search index...

    Interface RuleDefArg

    interface RuleDefArg {
        CATCHUP: (until: number) => void;
        ENSURE: (...args: string[]) => void;
        ENSURE_EITHER: (...args: string[]) => void;
        HANDLE_LOC: <T>(loc: Localized, nodeHandle: () => T) => undefined | T;
        NEW_LINE: (arg?: { force?: boolean }) => void;
        PRINT: (...args: string[]) => void;
        PRINT_ON_EMPTY: (...args: string[]) => void;
        PRINT_ON_OWN_LINE: (...args: string[]) => void;
        PRINT_WORD: (...args: string[]) => void;
        PRINT_WORDS: (...args: string[]) => void;
        SUBRULE: <T, U extends any[]>(
            rule: GeneratorRule<any, any, T, U>,
            input: T,
            ...arg: U,
        ) => void;
    }
    Index

    Properties

    CATCHUP: (until: number) => void

    Catchup the string until a given length, printing everything from the current catchup location until the index you provide.

    ENSURE: (...args: string[]) => void

    Ensures the requested characters are printed at the current location. Will not change the constructed string in case either:

    1. The string builder ends in the to ensure string. 2: The next printed string starts with the ensure string. Otherwise, prints the sting.
    ENSURE_EITHER: (...args: string[]) => void

    Ensures either one of the provided strings. If no string can be ensured, it will print the first argument.

    HANDLE_LOC: <T>(loc: Localized, nodeHandle: () => T) => undefined | T

    Handles the location of a node as if it was generated using a SUBRULE. Can be used to generate many nodes within a single subrule call while still having correct localization handling.

    NEW_LINE: (arg?: { force?: boolean }) => void

    Create a new line, will ensure the previous line does not end in blank characters. Will only print a newline if the pointer is not currently on a new line. When the traqulaIndentation is changed in the meanwhile, this will ensure the indentation of teh pointer updated.

    PRINT: (...args: string[]) => void

    Print the characters to the output string

    Type Declaration

      • (...args: string[]): void
      • Parameters

        • ...args: string[]

          arguments to be printed

        Returns void

    PRINT_ON_EMPTY: (...args: string[]) => void

    Start a newline to print arguments on

    PRINT_ON_OWN_LINE: (...args: string[]) => void

    Prints arguments on its own (shared) line

    PRINT_WORD: (...args: string[]) => void

    Prints all arguments as one word, ensuring it has a space before and behind each word

    PRINT_WORDS: (...args: string[]) => void

    Prints all arguments as words, ensuring they all have a space before and behind them.

    SUBRULE: <T, U extends any[]>(
        rule: GeneratorRule<any, any, T, U>,
        input: T,
        ...arg: U,
    ) => void

    Call another generator rule so it can generate its string representation.

    Type Declaration

      • <T, U extends any[]>(
            rule: GeneratorRule<any, any, T, U>,
            input: T,
            ...arg: U,
        ): void
      • Type Parameters

        • T
        • U extends any[]

        Parameters

        • rule: GeneratorRule<any, any, T, U>

          the rule to be called

        • input: T

          the ast input to work on

        • ...arg: U

          the remaining parameters required by this rule.

        Returns void