Class: ParseStream <T>

Type parameters

T: Token

Hierarchy

  • ParseStream

Constructors

constructor

+ new ParseStream(tokens: T[], parseToken: ParseToken‹T›): ParseStream

Defined in src/parser/parse-stream.ts:11

Parameters:

Name Type
tokens T[]
parseToken ParseToken‹T›

Returns: ParseStream

Properties

Private handlers

handlers: Record‹string, function›

Defined in src/parser/parse-stream.ts:9


Private parseToken

parseToken: ParseToken‹T›

Defined in src/parser/parse-stream.ts:11


Private stopRequested

stopRequested: boolean = false

Defined in src/parser/parse-stream.ts:10


Private tokens

tokens: T[]

Defined in src/parser/parse-stream.ts:8

Methods

on

on<T2>(name: string, cb: function): ParseStream‹T›

Defined in src/parser/parse-stream.ts:17

Type parameters:

T2: Template | T | undefined

Parameters:

name: string

cb: function

▸ (this: ParseStream, arg: T2): void

Parameters:

Name Type
this ParseStream
arg T2

Returns: ParseStream‹T›


start

start(): this

Defined in src/parser/parse-stream.ts:25

Returns: this


stop

stop(): this

Defined in src/parser/parse-stream.ts:39

Returns: this


Private trigger

trigger<T>(event: string, arg?: T): boolean

Defined in src/parser/parse-stream.ts:21

Type parameters:

T: Token | Template

Parameters:

Name Type
event string
arg? T

Returns: boolean