Private
atPrivate
atIf true, space and sequence indicators count as indentation
Private
atIf true, next token is a scalar value
Private
blockPrivate
blockPrivate
blockPrivate
documentPrivate
documentPrivate
flowPrivate
flowPrivate
indentCurrent indentation level
Private
lexerPrivate
lineCurrent offset since the start of parsing
Private
onOn the same line with a block map key
Private
Optional
onPrivate
peekPrivate
popPrivate
scalarPrivate
sourceThe source of the current token, set in parse()
Top indicates the node that's currently being built
Private
startPrivate
stepPrivate
streamPrivate
typeThe type of the current token, set in parse()
Private
sourceParse source
as a YAML stream.
If incomplete
, a part of the last line may be left as a buffer for the next call.
Errors are not thrown, but yielded as { type: 'error', message }
tokens.
Optional
incomplete: booleanA generator of tokens representing each directive, document, and other structure.
Generated using TypeDoc
A YAML concrete syntax tree (CST) parser
To use the parser with a user-provided lexer: