Class Action

Hierarchy

  • Action

Constructors

Properties

maybeMuted: boolean

This flag is to indicate whether this action's output might be muted. The lexer will based on this flag to accelerate the lexing process. If true, this action's output could be muted. If false, this action's output should never be muted.

Methods

  • Check token content if accept is true. condition should return error, undefined means no error.

    Parameters

    • condition: ((content: string) => any)
        • (content: string): any
        • Parameters

          • content: string

          Returns any

    Returns Action

  • Mute action if accept is true.

    Parameters

    • muted: boolean | ((content: string) => boolean) = true

    Returns Action

  • Reject if accept is true and rejecter returns true.

    Parameters

    • rejecter: boolean | ((content: string) => any) = true

    Returns Action

  • Call f if accept is true.

    Parameters

    • f: ((content: string) => void)
        • (content: string): void
        • Parameters

          • content: string

          Returns void

    Returns Action

Generated using TypeDoc