@@ -275,25 +275,25 @@ end
275275function _peek_inner (state:: LexerState )
276276 while (c = peek (state, Char)) != = nothing
277277 if c == ' \n '
278- read (state, Char)
279- return Token (_TOKEN_NEWLINE, " \n " )
278+ _ = read (state, Char)
279+ return Token (_TOKEN_NEWLINE, nothing )
280280 elseif isspace (c) # Whitespace
281- read (state, Char)
281+ _ = read (state, Char)
282282 elseif c == ' \\ ' # Comment: backslash until newline
283283 while (c = read (state, Char)) != = nothing && c != ' \n '
284284 end
285285 elseif isdigit (c) || (c == ' -' && isdigit (peek (state, Char))) # Number
286286 buf = IOBuffer ()
287287 while (c = peek (state, Char)) != = nothing && _is_number (c)
288288 write (buf, c)
289- read (state, Char)
289+ _ = read (state, Char)
290290 end
291291 return Token (_TOKEN_NUMBER, String (take! (buf)))
292292 elseif _is_starting_identifier (c) # Identifier / keyword
293293 buf = IOBuffer ()
294294 while (c = peek (state, Char)) != = nothing && _is_identifier (c)
295295 write (buf, c)
296- read (state, Char)
296+ _ = read (state, Char)
297297 end
298298 val = String (take! (buf))
299299 l_val = lowercase (val)
@@ -315,17 +315,17 @@ function _peek_inner(state::LexerState)
315315 end
316316 return Token (_TOKEN_IDENTIFIER, val)
317317 elseif (op = get (_OPERATORS, c, nothing )) != = nothing
318- read (state, Char) # Skip c
318+ _ = read (state, Char) # Skip c
319319 if c == ' -' && peek (state, Char) == ' >'
320- read (state, Char)
321- return Token (_TOKEN_IMPLIES, " -> " )
320+ _ = read (state, Char)
321+ return Token (_TOKEN_IMPLIES, nothing )
322322 elseif c == ' =' && peek (state, Char) in (' <' , ' >' )
323323 c = read (state, Char) # Allow =< and => as <= and >=
324- return Token (_OPERATORS[c], string (c) )
324+ return Token (_OPERATORS[c], nothing )
325325 elseif c in (' <' , ' >' , ' =' ) && peek (state, Char) == ' ='
326326 _ = read (state, Char) # Allow <=, >=, and ==
327327 end
328- return Token (op, string (c) )
328+ return Token (op, nothing )
329329 else
330330 throw (UnexpectedToken (Token (_TOKEN_UNKNOWN, " $c " )))
331331 end
0 commit comments