Class: Parser
Constructors
constructor
• new Parser(tokens
, prefixParselets
, infixParselets
)
Parameters
Name | Type |
---|---|
tokens | Token [] |
prefixParselets | Record <string , PrefixParselet > |
infixParselets | Record <string , InfixParselet > |
Defined in
packages/core/src/fhirlexer/parse.ts:90
Methods
hasMore
▸ hasMore(): boolean
Returns
boolean
Defined in
packages/core/src/fhirlexer/parse.ts:100
match
▸ match(expected
): boolean
Parameters
Name | Type |
---|---|
expected | string |
Returns
boolean
Defined in
packages/core/src/fhirlexer/parse.ts:104
consumeAndParse
▸ consumeAndParse(precedence?
): Atom
Parameters
Name | Type | Default value |
---|---|---|
precedence | number | Infinity |
Returns
Defined in
packages/core/src/fhirlexer/parse.ts:114
getPrecedence
▸ getPrecedence(): number
Returns
number
Defined in
packages/core/src/fhirlexer/parse.ts:134
consume
▸ consume(expectedId?
, expectedValue?
): Token
Parameters
Name | Type |
---|---|
expectedId? | string |
expectedValue? | string |
Returns
Defined in
packages/core/src/fhirlexer/parse.ts:146
peek
▸ peek(): undefined
| Token
Returns
undefined
| Token
Defined in
packages/core/src/fhirlexer/parse.ts:163
removeComments
▸ removeComments(): void
Returns
void
Defined in
packages/core/src/fhirlexer/parse.ts:167
getInfixParselet
▸ getInfixParselet(token
): undefined
| InfixParselet
Parameters
Name | Type |
---|---|
token | Token |
Returns
undefined
| InfixParselet
Defined in
packages/core/src/fhirlexer/parse.ts:171