MCPcopy
hub / github.com/go-yaml/yaml / skip_line

Function skip_line

scannerc.go:523–539  ·  view source on GitHub ↗
(parser *yaml_parser_t)

Source from the content-addressed store, hash-verified

521}
522
523func skip_line(parser *yaml_parser_t) {
524 if is_crlf(parser.buffer, parser.buffer_pos) {
525 parser.mark.index += 2
526 parser.mark.column = 0
527 parser.mark.line++
528 parser.unread -= 2
529 parser.buffer_pos += 2
530 parser.newlines++
531 } else if is_break(parser.buffer, parser.buffer_pos) {
532 parser.mark.index++
533 parser.mark.column = 0
534 parser.mark.line++
535 parser.unread--
536 parser.buffer_pos += width(parser.buffer[parser.buffer_pos])
537 parser.newlines++
538 }
539}
540
541// Copy a character to a string buffer and advance pointers.
542func read(parser *yaml_parser_t, s []byte) []byte {

Calls 3

is_crlfFunction · 0.85
is_breakFunction · 0.85
widthFunction · 0.85

Tested by

no test coverage detected