You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help?> peek
search: peek seek
peek(stream[, T=UInt8])
Read and return a value of type T from a stream without advancing the current position in the stream. See
also startswith(stream, char_or_string).
Examples
≡≡≡≡≡≡≡≡
julia> b = IOBuffer("julia");
julia> peek(b)
0x6a
julia> position(b)
0
julia> peek(b, Char)
'j': ASCII/Unicode U+006A (category Ll: Letter, lowercase)
│ Julia 1.5
│
│ The method which accepts a type requires Julia 1.5 or later.
──────────────────────────────────────────────────────────────────────────────────────────────────────────
peek(stream [, n=1]; skip_newlines=false)
Look ahead in the stream n tokens, returning the token kind. Comments and non-newline whitespace are
skipped automatically. Whitespace containing a single newline is returned as kind K"NewlineWs" unless
skip_newlines is true.
The last method initially looks like it's a variation of the first, but then the explanation stops making sense and at closer investigation it turns out to document a peek(::Base.JuliaSyntax.ParseStream) method. This is quite confusing but I guess the bigger question is whether JuliaSyntax should add methods to Base.peek in the first place.
The text was updated successfully, but these errors were encountered:
This is the
peek
docstring:The last method initially looks like it's a variation of the first, but then the explanation stops making sense and at closer investigation it turns out to document a
peek(::Base.JuliaSyntax.ParseStream)
method. This is quite confusing but I guess the bigger question is whetherJuliaSyntax
should add methods toBase.peek
in the first place.The text was updated successfully, but these errors were encountered: