@mathjax/src
    Preparing search index...

    Interface TokenMap

    TokenMaps are the base components for the input parsers.

    They provide a contains method that checks if a map is applicable (contains) a particular string. Implementing classes then perform the actual token parsing, from simple regular expression test, straight forward token mapping to transformational functionality on the parsed string.

    interface TokenMap {
        name: string;
        parser: ParseMethod;
        contains(token: string): boolean;
        parse(arg: ParseInput): ParseResult;
        parserFor(token: string): ParseMethod;
    }

    Implemented by

    Index

    Properties

    Methods

    Properties

    name: string

    The name of the map.

    parser: ParseMethod

    The default parsing method.

    Methods

    • Parameters

      • token: string

        A token to parse.

      Returns boolean

      True if the token map applies to the token.

    • Parameters

      • arg: ParseInput

        The parse input as environment, token duple.

      Returns ParseResult

      The parsed token and the rest of the string.

    • Parameters

      • token: string

        A token to parse.

      Returns ParseMethod

      A parse method for the token.