Class: Tokenizer

Hierarchy

  • Tokenizer

Constructors

constructor

+ new Tokenizer(input: string, file: string): Tokenizer

Defined in parser/tokenizer.ts:28

Parameters:

Name Type Default
input string -
file string “”

Returns: Tokenizer

Properties

N

N: number

Defined in parser/tokenizer.ts:28


Private file

file: string

Defined in parser/tokenizer.ts:31


Private input

input: string

Defined in parser/tokenizer.ts:30


p

p: number = 0

Defined in parser/tokenizer.ts:27

Methods

advance

advance(i: number): void

Defined in parser/tokenizer.ts:190

Parameters:

Name Type Default
i number 1

Returns: void


end

end(): boolean

Defined in parser/tokenizer.ts:194

Returns: boolean


matchWord

matchWord(word: string): boolean

Defined in parser/tokenizer.ts:285

Parameters:

Name Type
word string

Returns: boolean


mkError

mkError(msg: string, begin: number): void

Defined in parser/tokenizer.ts:146

Parameters:

Name Type
msg string
begin number

Returns: void


peek

peek(n: number): string

Defined in parser/tokenizer.ts:303

Parameters:

Name Type Default
n number 0

Returns: string


peekType

peekType(n: number): number

Defined in parser/tokenizer.ts:299

Parameters:

Name Type Default
n number 0

Returns: number


readExpression

readExpression(): IterableIterator‹Token

Defined in parser/tokenizer.ts:36

Returns: IterableIterator‹Token


readFileName

readFileName(): WordToken

Defined in parser/tokenizer.ts:279

Returns: WordToken


readFilter

readFilter(): FilterToken | null

Defined in parser/tokenizer.ts:67

Returns: FilterToken | null


readFilterArg

readFilterArg(): FilterArg | undefined

Defined in parser/tokenizer.ts:88

Returns: FilterArg | undefined


readFilters

readFilters(): FilterToken[]

Defined in parser/tokenizer.ts:59

Returns: FilterToken[]


readHTMLToken

readHTMLToken(options: NormalizedFullOptions): HTMLToken

Defined in parser/tokenizer.ts:115

Parameters:

Name Type
options NormalizedFullOptions

Returns: HTMLToken


readHash

readHash(): HashToken | undefined

Defined in parser/tokenizer.ts:170

Returns: HashToken | undefined


readHashes

readHashes(): HashToken[]

Defined in parser/tokenizer.ts:161

Returns: HashToken[]


readOperator

readOperator(): OperatorToken | undefined

Defined in parser/tokenizer.ts:53

Returns: OperatorToken | undefined


readOutputToken

readOutputToken(options: NormalizedFullOptions): OutputToken

Defined in parser/tokenizer.ts:136

Parameters:

Name Type
options NormalizedFullOptions

Returns: OutputToken


readQuoted

readQuoted(): QuotedToken | undefined

Defined in parser/tokenizer.ts:264

Returns: QuotedToken | undefined


readRange

readRange(): RangeToken | undefined

Defined in parser/tokenizer.ts:246

Returns: RangeToken | undefined


readTagToken

readTagToken(options: NormalizedFullOptions): TagToken

Defined in parser/tokenizer.ts:126

Parameters:

Name Type
options NormalizedFullOptions

Returns: TagToken


readTo

readTo(end: string): number

Defined in parser/tokenizer.ts:198

Parameters:

Name Type
end string

Returns: number


readTopLevelToken

readTopLevelToken(options: NormalizedFullOptions): TopLevelToken

Defined in parser/tokenizer.ts:108

Parameters:

Name Type
options NormalizedFullOptions

Returns: TopLevelToken


readTopLevelTokens

readTopLevelTokens(options: NormalizedFullOptions): TopLevelToken[]

Defined in parser/tokenizer.ts:98

Parameters:

Name Type Default
options NormalizedFullOptions defaultOptions

Returns: TopLevelToken[]


readValue

readValue(): ValueToken | undefined

Defined in parser/tokenizer.ts:206

Returns: ValueToken | undefined


readValueOrThrow

readValueOrThrow(): ValueToken

Defined in parser/tokenizer.ts:258

Returns: ValueToken


readWord

readWord(): WordToken

Defined in parser/tokenizer.ts:154

Returns: WordToken


remaining

remaining(): string

Defined in parser/tokenizer.ts:186

Returns: string


reverseMatchWord

reverseMatchWord(word: string): boolean

Defined in parser/tokenizer.ts:292

Parameters:

Name Type
word string

Returns: boolean


skipBlank

skipBlank(): void

Defined in parser/tokenizer.ts:307

Returns: void


snapshot

snapshot(begin: number): string

Defined in parser/tokenizer.ts:150

Parameters:

Name Type Default
begin number this.p

Returns: string