A few lines above that, where it says assert(ch == '\'' || ch == '"'), change the '"' to '\"' (i.e. add the backslash to escape it).
I am a bit confused as to why this is necessary, but it probably has to do with how the assert() macro is defined -- it is likely trying to use the contents of the expression as a constant string (putting it inside of " ... " characters, so the escape becomes necessary). Just a guess though.