Options
All
  • Public
  • Public/Protected
  • All
Menu

A Custom Numeric Format String parser implementation. It does not produce concrete formatting options but does lend its intermediate and final state to visiting instances.

Hierarchy

  • CustomParser

Index

Constructors

constructor

Properties

Private decimalPointIndex_

decimalPointIndex_: number

Private escapeManyChar_

escapeManyChar_: string

Private escapeOne_

escapeOne_: boolean

Private exponentGroups_

exponentGroups_: RegExpExecArray

Private exponentMatchIndex_

exponentMatchIndex_: number

Private firstNumericSpecifierIndex_

firstNumericSpecifierIndex_: number

Private firstZeroSpecifierIndex_

firstZeroSpecifierIndex_: number

Private format_

format_: string

Private index_

index_: number

Private innerNumericSpecifiersIndex_

innerNumericSpecifiersIndex_: number

Private lastGroupSeparatorIndex_

lastGroupSeparatorIndex_: number

Private lastNumericSpecifierIndex_

lastNumericSpecifierIndex_: number

Private lastZeroSpecifierIndex_

lastZeroSpecifierIndex_: number

Private lookahead_

lookahead_: Lazy<CustomParser>

Private secondaryExponent_

secondaryExponent_: string

Private sectionIndex_

sectionIndex_: number

Private sections_

sections_: string[]

Methods

Private addExponentOffset_

  • addExponentOffset_(): void

Private addToSection_

  • addToSection_(): void

Private canHandleSpecifier_

  • canHandleSpecifier_(handler: function): boolean

Private doDetachedParse_

  • doDetachedParse_(): void

doParse

  • Parses the [[format]] string this instance was initialized with. The method uses the supplied resolvers map as a means for an outside class to access the intermediate state of the parser each time a specifier is visited.

    Parameters

    • resolvers: CustomSpecifiersMap<function>

      A map between a specifier type and a resolver function that is called after the parser evaluates its intermediate state.

    • charResolver: function

      A standalone resolver function that is called for every visited character that is not considered a specifier.

        • (): void
        • Returns void

    Returns void

getCurrentChar

  • getCurrentChar(): string

getDigitsBeforeDecimal

  • getDigitsBeforeDecimal(): number

Private getExponentGroups_

  • getExponentGroups_(): RegExpExecArray

getExponentPlaceholderCount

  • getExponentPlaceholderCount(): number

getExponentSign

  • getExponentSign(): string

Private getHandlers_

getIndexFromDecimal

  • getIndexFromDecimal(): number

Private getLookahead_

getNumberPlaceholderCountAfterDecimal

  • getNumberPlaceholderCountAfterDecimal(): number

Private getNumberPlaceholderCountBeforeDecimal_

  • getNumberPlaceholderCountBeforeDecimal_(): number

getZeroPlaceholderCountAfterDecimal

  • getZeroPlaceholderCountAfterDecimal(): number

Private getZeroPlaceholderCountBeforeDecimal_

  • getZeroPlaceholderCountBeforeDecimal_(): number

Private handleLiteralStringDelimeter_

  • handleLiteralStringDelimeter_(): void

Private handleNumericSpecifier_

  • handleNumericSpecifier_(): void

Private handleSpecifier_

isAfterDecimal

  • isAfterDecimal(): boolean

isAfterNumericSpecifiers

  • isAfterNumericSpecifiers(): boolean

isBeforeNumericSpecifiers

  • isBeforeNumericSpecifiers(): boolean

isExponentMatched

  • isExponentMatched(): boolean

isExponentUppercase

  • isExponentUppercase(): boolean

isImmediateAfterNumericSpecifiers

  • isImmediateAfterNumericSpecifiers(): boolean

Private matchExponent_

  • matchExponent_(): RegExpExecArray

Static getSections

  • getSections(format: string): string[]

Generated using TypeDoc