Skip to content
Snippets Groups Projects
  • Damien George's avatar
    f4aebafe
    py/lexer: Remove unnecessary check for EOF in lexer's next_char func. · f4aebafe
    Damien George authored
    This check always fails (ie chr0 is never EOF) because the callers of this
    function never call it past the end of the input stream.  And even if they
    did it would be harmless because 1) reader.readbyte must continue to
    return an EOF char if the stream is exhausted; 2) next_char would just
    count the subsequent EOF's as characters worth 1 column.
    f4aebafe
    History
    py/lexer: Remove unnecessary check for EOF in lexer's next_char func.
    Damien George authored
    This check always fails (ie chr0 is never EOF) because the callers of this
    function never call it past the end of the input stream.  And even if they
    did it would be harmless because 1) reader.readbyte must continue to
    return an EOF char if the stream is exhausted; 2) next_char would just
    count the subsequent EOF's as characters worth 1 column.
lexer.c 27.55 KiB