diff --git a/src/parser.jl b/src/parser.jl index 182b861..9619315 100644 --- a/src/parser.jl +++ b/src/parser.jl @@ -214,7 +214,7 @@ end function parse_document_content(stream::EventStream) - if in(peek(stream.input), [DirectiveToken, DocumentStartToken, DocumentEndToken,StreamEndToken]) + if peek(stream.input) isa Union{DirectiveToken, DocumentStartToken, DocumentEndToken,StreamEndToken} event = process_empty_scalar(stream, peek(stream.input).span.start_mark) stream.state = pop!(stream.states) event