Class: HedStringParser

HedStringParser(hedString, hedSchemas, definitionsAllowed, placeholdersAllowed)

A parser for HED strings.

Constructor

new HedStringParser(hedString, hedSchemas, definitionsAllowed, placeholdersAllowed)

Constructor.
Parameters:
Name Type Description
hedString string | ParsedHedString The HED string to be parsed.
hedSchemas Schemas The collection of HED schemas.
definitionsAllowed boolean True if definitions are allowed
placeholdersAllowed boolean True if placeholders are allowed
Source:

Members

definitionsAllowed :boolean

True if definitions are allowed in this string.
Type:
  • boolean
Source:

hedSchemas :Schemas

The collection of HED schemas.
Type:
Source:

hedString :string|ParsedHedString

The HED string being parsed.
Type:
Source:

placeholdersAllowed :boolean

True if placeholders are allowed in this string.
Type:
  • boolean
Source:

Methods

parse(fullValidation) → {Array}

Parse a full HED string.
Parameters:
Name Type Description
fullValidation boolean True if full full validation should be performed -- with assemploy ###Note: now separates errors and warnings for easier handling.
Source:
Returns:
- [ParsedHedString|null, Issue[], Issue[]] representing the parsed HED string and any parsing issues.
Type
Array

(static) parseHedStrings(hedStrings, hedSchemas, definitionsAllowed, placeholdersAllowed) → {Array}

Parse a list of HED strings.
Parameters:
Name Type Description
hedStrings Array.<string> | Array.<ParsedHedString> A list of HED strings.
hedSchemas Schemas The collection of HED schemas.
definitionsAllowed boolean True if definitions are allowed
placeholdersAllowed boolean True if placeholders are allowed
Source:
Returns:
- [ParsedHedString[], Issue[], Issue[]] representing the parsed HED strings and any errors and warnings.
Type
Array