Skip to main content

Class: Parser

Constructors

constructor

new Parser(tokens, prefixParselets, infixParselets)

Parameters

NameType
tokensToken[]
prefixParseletsRecord<string, PrefixParselet>
infixParseletsRecord<string, InfixParselet>

Defined in

packages/core/src/fhirlexer/parse.ts:84

Methods

hasMore

hasMore(): boolean

Returns

boolean

Defined in

packages/core/src/fhirlexer/parse.ts:94


match

match(expected): boolean

Parameters

NameType
expectedstring

Returns

boolean

Defined in

packages/core/src/fhirlexer/parse.ts:98


consumeAndParse

consumeAndParse(precedence?): Atom

Parameters

NameTypeDefault value
precedencenumberInfinity

Returns

Atom

Defined in

packages/core/src/fhirlexer/parse.ts:108


getPrecedence

getPrecedence(): number

Returns

number

Defined in

packages/core/src/fhirlexer/parse.ts:128


consume

consume(expectedId?, expectedValue?): Token

Parameters

NameType
expectedId?string
expectedValue?string

Returns

Token

Defined in

packages/core/src/fhirlexer/parse.ts:140


peek

peek(): undefined | Token

Returns

undefined | Token

Defined in

packages/core/src/fhirlexer/parse.ts:157


removeComments

removeComments(): void

Returns

void

Defined in

packages/core/src/fhirlexer/parse.ts:161


getInfixParselet

getInfixParselet(token): undefined | InfixParselet

Parameters

NameType
tokenToken

Returns

undefined | InfixParselet

Defined in

packages/core/src/fhirlexer/parse.ts:165