Skip to content

Commit b07898c

Browse files
committed
Update
1 parent 844f3d4 commit b07898c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/FileFormats/LP/read.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ function _throw_unexpected_token(state::LexerState, token::Token, msg::String)
255255
line = String(read(state.io, 2 * offset))
256256
i = something(findprev('\n', line, offset-1), 0)
257257
j = something(findnext('\n', line, offset), length(line) + 1)
258-
help = string(line[i+1:j-1], "\n", " "^(offset - i + - 1), "^\n", msg)
258+
help = string(line[(i+1):(j-1)], "\n", " "^(offset - i + - 1), "^\n", msg)
259259
return throw(UnexpectedToken(token, state.line, help))
260260
end
261261

@@ -293,7 +293,7 @@ end
293293

294294
function Base.read(state::LexerState, ::Type{Token})
295295
token = peek(state, Token, 1)
296-
if isempty(state.peek_tokens)
296+
if isempty(state.peek_tokens)
297297
_throw_unexpected_token(
298298
state,
299299
Token(_TOKEN_UNKNOWN, "EOF", position(state.io)),
@@ -627,7 +627,7 @@ function _parse_term(
627627
return _throw_unexpected_token(
628628
state,
629629
token,
630-
"Got $(_KIND_TO_MSG[token.kind]), But we expected this to be a new term in the expression.",
630+
"Got $(_KIND_TO_MSG[token.kind]), but we expected this to be a new term in the expression.",
631631
)
632632
end
633633

@@ -883,11 +883,7 @@ function _parse_indicator_constraint(
883883
elseif t.value == "1"
884884
MOI.ACTIVATE_ON_ONE
885885
else
886-
_throw_unexpected_token(
887-
state,
888-
t,
889-
"This must be either `= 0` or `= 1`.",
890-
)
886+
_throw_unexpected_token(state, t, "This must be either `= 0` or `= 1`.")
891887
end
892888
_ = read(state, Token, _TOKEN_IMPLIES)
893889
f = _parse_expression(state, cache)

0 commit comments

Comments
 (0)