The parser implements the following grammar: stream ::= STREAM-START implicit_document? explicit_document* STREAM-END implicit_document ::= block_node DOCUMENT-END* explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* block_node_or_indentless_sequence ::=
(parser *yaml_parser_t)
| 66 | |
| 67 | // Peek the next token in the token queue. |
| 68 | func peek_token(parser *yaml_parser_t) *yaml_token_t { |
| 69 | if parser.token_available || yaml_parser_fetch_more_tokens(parser) { |
| 70 | token := &parser.tokens[parser.tokens_head] |
| 71 | yaml_parser_unfold_comments(parser, token) |
| 72 | return token |
| 73 | } |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | // yaml_parser_unfold_comments walks through the comments queue and joins all |
| 78 | // comments behind the position of the provided token into the respective |
no test coverage detected