public void br() {
        sp();

        // EOF can also be considered a line break to end a file.
        if (eof()) {
            return;
        }

        char c = peek();
        if (c == '\n' || c == '\r') {
            skip();
        } else {
            throw syntax("Expected a line break, but found '" + c + "'");
        }
    }
Skips spaces then expects that the next character is either the end of
the expression or a line break (\n, \r\n, or \r).

@throws RuntimeException if the next non-space character is not EOF or a line break.
smithy-utils/src/main/java/software/amazon/smithy/utils/SimpleParser.java