|
1 | 1 | # YAML 1.1 [27] b-char ::= b-line-feed | b-carriage-return | b-next-line | b-line-separator | b-paragraph-separator |
2 | | -yaml_1_1_is_b_char(c::Char) = c == '\n' || c == '\r' || c == '\u85' || c == '\u2028' || c == '\u2029' |
| 2 | +is_b_char(::YAMLV1_1, c::Char) = c == '\n' || c == '\r' || c == '\u85' || c == '\u2028' || c == '\u2029' |
3 | 3 |
|
4 | 4 | # YAML 1.1 [41] ns-ascii-letter ::= [#x41-#x5A] /*A-Z*/ | [#61-#x7A] /*a-z*/ |
5 | 5 | # YAML 1.2 [37] ns-ascii-letter ::= [x41-x5A] | [x61-x7A] # A-Z a-z |
@@ -1217,7 +1217,7 @@ function scan_block_scalar_breaks(stream::TokenStream, indent) |
1217 | 1217 | forwardchars!(stream) |
1218 | 1218 | end |
1219 | 1219 |
|
1220 | | - while yaml_1_1_is_b_char(peek(stream.input)) |
| 1220 | + while is_b_char(YAMLV1_1(), peek(stream.input)) |
1221 | 1221 | push!(chunks, scan_line_break(stream)) |
1222 | 1222 | end_mark = get_mark(stream) |
1223 | 1223 | while stream.column < indent && peek(stream.input) == ' ' |
@@ -1317,7 +1317,7 @@ function scan_flow_scalar_non_spaces(stream::TokenStream, double::Bool, |
1317 | 1317 | end |
1318 | 1318 | push!(chunks, Char(parse(Int, prefix(stream.input, length), base = 16))) |
1319 | 1319 | forwardchars!(stream, length) |
1320 | | - elseif yaml_1_1_is_b_char(c) |
| 1320 | + elseif is_b_char(YAMLV1_1(), c) |
1321 | 1321 | scan_line_break(stream) |
1322 | 1322 | append!(chunks, scan_flow_scalar_breaks(stream, double, start_mark)) |
1323 | 1323 | else |
@@ -1347,7 +1347,7 @@ function scan_flow_scalar_spaces(stream::TokenStream, double::Bool, |
1347 | 1347 | if c == '\0' |
1348 | 1348 | throw(ScannerError("while scanning a quoted scalar", start_mark, |
1349 | 1349 | "found unexpected end of stream", get_mark(stream))) |
1350 | | - elseif yaml_1_1_is_b_char(c) |
| 1350 | + elseif is_b_char(YAMLV1_1(), c) |
1351 | 1351 | line_break = scan_line_break(stream) |
1352 | 1352 | breaks = scan_flow_scalar_breaks(stream, double, start_mark) |
1353 | 1353 | if line_break != '\n' |
@@ -1380,7 +1380,7 @@ function scan_flow_scalar_breaks(stream::TokenStream, double::Bool, |
1380 | 1380 | forward!(stream.input) |
1381 | 1381 | end |
1382 | 1382 |
|
1383 | | - if yaml_1_1_is_b_char(peek(stream.input)) |
| 1383 | + if is_b_char(YAMLV1_1(), peek(stream.input)) |
1384 | 1384 | push!(chunks, scan_line_break(stream)) |
1385 | 1385 | else |
1386 | 1386 | return chunks |
@@ -1464,7 +1464,7 @@ function scan_plain_spaces(stream::TokenStream, indent::Integer, |
1464 | 1464 | whitespaces = prefix(stream.input, length) |
1465 | 1465 | forwardchars!(stream, length) |
1466 | 1466 | c = peek(stream.input) |
1467 | | - if yaml_1_1_is_b_char(c) |
| 1467 | + if is_b_char(YAMLV1_1(), c) |
1468 | 1468 | line_break = scan_line_break(stream) |
1469 | 1469 | stream.allow_simple_key = true |
1470 | 1470 | if peek(stream.input) == '\uFEFF' |
|
0 commit comments