Ace API Reference
    Preparing search index...

    Class Tokenizer

    This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see the wiki on extending highlighters.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new tokenizer based on the given rules and flags.

      Parameters

      • rules: any

        The highlighting rules

      Returns Tokenizer

    Properties

    matchMappings: {}
    regExps: {}
    reportError: (msg: any, data: any) => void
    splitRegex: RegExp
    states: any

    Methods

    • Parameters

      • src: string
      • flag: string

      Returns RegExp

    • Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.

      Parameters

      • line: string
      • startState: string | string[]

      Returns { state: string | string[]; tokens: Token[] }

    • Parameters

      • src: string

      Returns string