public final char expect(char token) {
        if (peek() == token) {
            skip();
            return token;
        }

        throw syntax(String.format("Expected: '%s', but found '%s'", token, peekSingleCharForMessage()));
    }
Expects that the next character is the given character and consumes it.

@param token The character to expect.
@return Returns the expected character.
smithy-utils/src/main/java/software/amazon/smithy/utils/SimpleParser.java