Type alias UcrxInsetSyntax

UcrxInsetSyntax: ((this, id, emit, cx) => UcrxInsetLexer | undefined)

Type declaration

    • (this, id, emit, cx): UcrxInsetLexer | undefined
    • Inset syntax is a function that creates a lexer for inset. I.e. for the input chunks enclosed into inset bounds.

      Once an inset is encountered, the deserializer would try to use the lexer defined by charge receiver. If the latter is not defined, it will try to use the one created by this method. If that fails, an error will be reported.

      Parameters

      • this: void
      • id: number | string

        Inset format identifier.

      • emit: ((token) => void)

        Emitter function called each time a token is found.

          • (token): void
          • Parameters

            Returns void

      • cx: UcrxContext

        Charge processing context.

      Returns UcrxInsetLexer | undefined

      Either input lexer factory, or undefined if an inset is not expected.

Generated using TypeDoc