Holds supporting and execution information and data for a template of tags

Constructors

  • Parameters

    • options: {
          processor: RenderProcessor;
          templateDir?: string;
          templateTags: any[];
          tokenHandlers?: Function | Function[];
      }
      • processor: RenderProcessor

        template tag processor for generating rendering steps

      • Optional templateDir?: string

        directory where the template file resides

      • templateTags: any[]

        template tags

      • Optional tokenHandlers?: Function | Function[]

        initial token handlers

    Returns TagTemplate

Properties

_processor: RenderProcessor
_tagOpCodes: any[]
_templateDir: string
_templateTags: any[]
_tokenHandlers: Function[]

Methods

  • Parameters

    • Optional id: string
    • Optional str: string | RegExp
    • Optional index: number
    • Optional instance: number
    • Optional msg: string

    Returns any

  • Parameters

    • id: any
    • Optional count: number

    Returns any[]

  • Find a literal token in the template by matching its str

    Parameters

    • matcher: any

      a string or a RegExp to match token's str

    • Optional count: number

    Returns any[]

  • Returns a template tag

    Parameters

    • index: number

      index of the tag in the template tags array

    Returns any

    template tag

  • Get a execution step opcode for the template tag at index

    Parameters

    • index: number

      index of the tag in the template tags array

    Returns any

    template tag exec step opcode

  • Handle a sub template returned by executing a step

    Parameters

    • step: any

      the step that was executed

    • templateTags: any[]

      the template tags returned

    Returns any

    new step for executing the sub template tags

  • Pre-initialize execution step opcode for the template tags

    Returns void