Parser

Generates events from tokens provided by a Scanner.

While Parser receives tokens with non-const character slices, the events it produces are immutable strings, which are usually the same slices, cast to string. Parser is the last layer of D:YAML that may possibly do any modifications to these slices.

Constructors

this
this(Scanner scanner)

Construct a Parser using specified Scanner.

Destructor

~this
~this()

Destroy the parser.

Members

Functions

checkEvent
bool checkEvent(EventID[] ids...)

Check if the next event is one of specified types.

getEvent
immutable(Event) getEvent()

Return the next event, removing it from the queue.

peekEvent
immutable(Event) peekEvent()

Return the next event, but keep it in the queue.

Meta