Ace API Reference
    Preparing search index...

    Tokenizes the current [[Document Document]] in the background, and caches the tokenized rows for future use.

    If a certain row is changed, everything below that row is re-tokenized.

    Index

    Constructors

    • Creates a new BackgroundTokenizer object.

      Parameters

      • tokenizer: Tokenizer

        The tokenizer to use

      • Optionalsession: EditSession

        The editor session to associate with

      Returns BackgroundTokenizer

    Properties

    $worker: () => void
    currentLine: number
    doc: Document
    lines: any[]
    running: number | false
    states: string[] | string[][]
    tokenizer: Tokenizer

    Methods

    • Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.

      Parameters

      • firstRow: number

        The starting row region

      • lastRow: number

        The final row region

      Returns void

    • Returns the state of tokenization at the end of a row.

      Parameters

      • row: number

        The row to get state at

      Returns string | string[]

    • Sets a new document to associate with this object.

      Parameters

      • doc: Document

        The new document to associate with

      Returns void

    • Starts tokenizing at the row indicated.

      Parameters

      • startRow: number

        The row to start at

      Returns void