Skip to content

Commit 848f549

Browse files
committed
add peekchar for IOBuffer
1 parent a090b63 commit 848f549

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lexer.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function Base.show(io::IO, ps::ParseState)
6464
println(io, "next : ", kindof(ps.nt), " ($(ps.nt))", " ($(wstype(ps.nws)))")
6565
end
6666
peekchar(ps::ParseState) = peekchar(ps.l)
67+
peekchar(io::Base.GenericIOBuffer) = peek(io, Char)
6768
wstype(t::AbstractToken) = kindof(t) == EmptyWS ? "empty" :
6869
kindof(t) == NewLineWS ? "ws w/ newline" :
6970
kindof(t) == SemiColonWS ? "ws w/ semicolon" : "ws"

0 commit comments

Comments
 (0)