dCBOR Pattern TypeScript - v1.0.0-alpha.20
    Preparing search index...

    Class Lexer

    Lexer state for tokenizing dCBOR pattern expressions.

    Index

    Constructors

    Methods

    • Returns the current position in the input.

      Returns number

    • Returns the remaining input.

      Returns string

    • Peeks at the current character without consuming it.

      Returns string | undefined

    • Peeks at the character at offset from current position.

      Parameters

      • offset: number

      Returns string | undefined

    • Consumes and returns the current character.

      Returns string | undefined

    • Advances by n characters.

      Parameters

      • n: number

      Returns void

    • Creates a span from start to current position.

      Parameters

      • start: number

      Returns Span

    • Skips whitespace characters.

      Returns void

    • Checks if the remainder starts with the given string.

      Parameters

      • s: string

      Returns boolean

    • Peeks at the next token without consuming it. Returns a Result with the token or undefined if at end of input.

      Returns Result<Token> | undefined