Constructors
constructor
- new Tokenizer(input, operators?, file?, range?): Tokenizer
Parameters
- input: string
- operators: Operators = defaultOptions.operators
Optional
file: stringOptional
range: [number, number]
Properties
Optional
file
file?: string
Methods
advance
- advance(step?): void
Returns void
assert
- assert(pred, msg, pos?): void
Parameters
- pred: unknown
- msg: string | (() => string)
Optional
pos: number
Returns void
end
- end(): boolean
Returns boolean
match
- match(word): boolean
Returns boolean
matchTrie
- matchTrie<T>(trie): number
Returns number
peek
- peek(n?): string
Returns string
peekType
- peekType(n?): number
Returns number
readHash
- readHash(jekyllStyle?): undefined | HashToken
Parameters
Optional
jekyllStyle: string | boolean
Returns undefined | HashToken
readHashes
- readHashes(jekyllStyle?): HashToken[]
Parameters
Optional
jekyllStyle: string | boolean
readTagName
- readTagName(): string
Returns string
readTo
- readTo(end): number
Returns number
readToDelimiter
- readToDelimiter(delimiter, respectQuoted?): number
Parameters
- delimiter: string
- respectQuoted: boolean = false
Returns number
remaining
- remaining(): string
Returns string
rmatch
- rmatch(pattern): boolean
Returns boolean
skipBlank
- skipBlank(): void
Returns void
snapshot
- snapshot(begin?): string
Returns string
Deprecated
use #readIdentifier instead