Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CustomSyntax

Handle the custom syntax and gets the start and end index, and the text value of the variables, placehodlers and repeaters.

export
class

CustomSyntax

Hierarchy

  • CustomSyntax

Index

Methods

Private allowedMatch

  • allowedMatch(fileRows: string, match: RegExpExecArray): boolean
  • Check if the match is allowed and is not preceded by a backslash.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to match.

    • match: RegExpExecArray

      The match to check if valid.

    Returns boolean

    If the match is valid.

Private getErrorHandlers

  • Get the error block.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The text to search for errors.

    Returns ISyntaxType[]

    The error handlers.

Private getPlaceholders

  • Get the list of all the placeholder' position and value.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to match.

    Returns ISyntaxType[]

    The list of the location and values of a specific type.

Private getRepeaters

  • Get the list of all the repeater' position and value.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to match.

    Returns ISyntaxType[]

    The list of the location and values of a specific type.

getSyntax

  • getSyntax(fileRows: string, type: string): ISyntaxType[]
  • Get the location and vlaue for the variables, placeholders or repeaters.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to get the position and value of a specific syntax type.

    • type: string

      The type to get the list of. Can be either "variables", "placeholders" or "repeaters".

    Returns ISyntaxType[]

    The list of the location and values of a specific type.

Private getVariables

  • Get the list of all the variables' position and value.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to match.

    Returns ISyntaxType[]

    The list of the location and values of a specific type.

Private matchRegex

  • matchRegex(fileRows: string, regex: RegExp): ISyntaxType[]
  • Match the file rows with a regex.

    memberof

    CustomSyntax

    Parameters

    • fileRows: string

      The file rows of which to match.

    • regex: RegExp

      The regex to match with.

    Returns ISyntaxType[]

    The list of the location and values of a specific type.

Generated using TypeDoc