Skip to content

Commit b8b5140

Browse files
committed
Combine the two readexpr! methods
A default value is all that's needed for the second argument, no need to explicitly write this as another method.
1 parent fb12f9b commit b8b5140

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/styledmarkup.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function interpolated!(state::State, i::Int, _)
181181
state.interpolated[] = true
182182
end
183183

184-
function readexpr!(state::State, pos::Int)
184+
function readexpr!(state::State, pos::Int = first(popfirst!(state.s)) + 1)
185185
if isempty(state.s)
186186
styerr!(state,
187187
AnnotatedString("Identifier or parenthesised expression expected after \$ in string",
@@ -198,7 +198,6 @@ function readexpr!(state::State, pos::Int)
198198
expr, nextpos
199199
end
200200

201-
readexpr!(state) = readexpr!(state, first(popfirst!(state.s)) + 1)
202201

203202
function skipwhitespace!(state::State)
204203
while isnextchar(state, (' ', '\t', '\n', '\r'))

0 commit comments

Comments
 (0)