HED JavaScript Library
    Preparing search index...

    Class HedStringTokenizer

    Class for tokenizing HED strings.

    Index

    Constructors

    Properties

    hedString: string

    The HED string being tokenized.

    issues: Issue[]

    The issues found during tokenization.

    The current state of the tokenizer.

    Methods

    • Internal

      Check for issues related to placeholders in the current token.

      Returns string

      empty string if no issues, otherwise a message describing the issue.

    • Internal

      Close the current group.

      Parameters

      • i: number

        The current index in the HED string.

      Returns void

    • Internal

      Handle a single character during tokenization.

      Parameters

      • i: number

        The index of the character.

      • character: string

        The character to handle.

      Returns void

    • Internal

      Handle a closing column character.

      Parameters

      • i: number

        The index of the closing column character.

      Returns void

    • Internal

      Handle a closing group character.

      Parameters

      • i: number

        The index of the closing group character.

      Returns void

    • Internal

      Handle a colon character.

      Parameters

      • i: number

        The index of the colon.

      Returns void

    • Internal

      Handle a comma character.

      Parameters

      • i: number

        The index of the comma.

      Returns void

    • Internal

      Handle an opening column character.

      Parameters

      • i: number

        The index of the opening column character.

      Returns void

    • Internal

      Handle an opening group character.

      Parameters

      • i: number

        The index of the opening group character.

      Returns void

    • Internal

      Handle a slash character.

      Parameters

      • i: number

        The index of the slash.

      Returns void

    • Internal

      Push an invalid character issue to the issue list.

      Parameters

      • character: string

        The invalid character.

      • index: number

        The index of the character.

      • msg: string = ''

        An optional message to include with the error.

      Returns void

    • Internal

      Push an invalid tag issue to the issue list.

      Parameters

      • issueCode: string

        The issue code.

      • index: number

        The index of the issue.

      • tag: string

        The invalid tag.

      • msg: string = ''

        An optional message to include with the error.

      Returns void

    • Internal

      Push an issue to the issue list.

      Parameters

      • issueCode: string

        The issue code.

      • index: number

        The index of the issue.

      • msg: string = ''

        An optional message to include with the error

      Returns void

    • Internal

      Push a tag to the current group stack.

      Parameters

      • i: number

        The current index in the HED string.

      Returns void

    • Internal

      Reset the current token.

      Parameters

      • i: number

        The current index in the HED string.

      Returns void

    • Split the HED string into delimiters and tags.

      Returns any[]

      • [TagSpec[], GroupSpec, Issue[]] representing the tag specifications, group bounds, and any issues found.