Skip to content

Commit

Permalink
Change let to begin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paalon committed Jun 17, 2024
1 parent 4ceec93 commit f5499f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scanner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ check_document_start(stream::TokenStream) =

check_document_end(stream::TokenStream) =
stream.column == 0 &&
prefix(stream.input, 3) == "..." && let
prefix(stream.input, 3) == "..." && begin
c = peek(stream.input, 3)
yaml_1_1_is_whitespace(c) || c === nothing
end
Expand All @@ -378,20 +378,20 @@ function check_block_entry(stream::TokenStream)
end

check_key(stream::TokenStream) =
stream.flow_level > 0 || let
stream.flow_level > 0 || begin
cnext = peek(stream.input, 1)
yaml_1_1_is_whitespace(cnext)
end

check_value(stream::TokenStream) =
stream.flow_level > 0 || let
stream.flow_level > 0 || begin
cnext = peek(stream.input, 1)
yaml_1_1_is_whitespace(cnext) || cnext === nothing
end

function check_plain(stream::TokenStream)
c = peek(stream.input)
!(yaml_1_1_is_whitespace(c) || c in "-?:,[]{}#&*!|>\'\"%@`\uFEFF") || let
!(yaml_1_1_is_whitespace(c) || c in "-?:,[]{}#&*!|>\'\"%@`\uFEFF") || begin
cnext = peek(stream.input, 1)
!yaml_1_1_is_whitespace(cnext) && (c == '-' || stream.flow_level == 0 && (c == '?' || c == ':'))
end
Expand Down

0 comments on commit f5499f6

Please sign in to comment.