mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #758 from 52Jolynn/fix_comment_bug
修复单行、多行注释未正常结尾的bug。
This commit is contained in:
@@ -770,7 +770,11 @@ public class Lexer {
|
||||
scanChar();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// multiline comment结束符错误
|
||||
if (ch == EOI) {
|
||||
throw new ParserException("unterminated /* comment.");
|
||||
}
|
||||
scanChar();
|
||||
bufPos++;
|
||||
}
|
||||
@@ -800,6 +804,11 @@ public class Lexer {
|
||||
scanChar();
|
||||
break;
|
||||
}
|
||||
|
||||
// single line comment结束符错误
|
||||
if (ch == EOI) {
|
||||
throw new ParserException("syntax error at end of input.");
|
||||
}
|
||||
|
||||
scanChar();
|
||||
bufPos++;
|
||||
|
||||
Reference in New Issue
Block a user