cheniison opened this issue 7 years ago · 0 comments
// block comment char prevPeek = ' '; for(;;prevPeek = peek, peek = (char)stream.read()){ if(prevPeek == '*' && peek == '/'){ break; } }
当被分析的字符串为 /*/ 时,它可以被正确地解析成块注释。 应该在循环之前加上一条 peek = (char)stream.read();
/*/
peek = (char)stream.read();