Simple bitset for parsing to identify if a character is a match within a bitset range.

Constructors

Properties

Methods

Constructors

Properties

bitset: Uint32Array = ...

Methods

  • Plus operator (one or many)

    Parameters

    • input: Uint8Array

      The input buffer to match against.

    • cursor: number

      The cursor to test the match against.

    • end: number

    Returns undefined | number

    The end of the match or undefined.

  • Set items in the bitfield corresponding to a byte or bytes.

    Parameters

    • chars: string | number | Uint8Array

      A byte as number, a string as a set of characters (ASCII) or a list of bytes in a Uint8array.

    Returns void

  • Kleene Star operator (zero or many)

    Parameters

    • input: Uint8Array

      The input buffer to match against.

    • cursor: number

      The cursor to test the match against.

    • end: number

    Returns number

    The end of the match.