improve sqlwall

This commit is contained in:
Yako
2014-11-13 13:26:12 +08:00
parent 92ebbdee2f
commit aec444ea17
5 changed files with 38 additions and 38 deletions
@@ -108,17 +108,13 @@ public class SQLServerLexer extends Lexer {
hasComment = true;
}
if (token != Token.HINT && !isAllowComment()) {
if (token != Token.HINT && !isAllowComment() && !isSafeComment(stringVal)) {
throw new NotAllowCommentException();
}
return;
}
if (!isAllowComment()) {
throw new NotAllowCommentException();
}
if (ch == '/' || ch == '-') {
scanChar();
bufPos++;
@@ -150,6 +146,10 @@ public class SQLServerLexer extends Lexer {
token = Token.LINE_COMMENT;
hasComment = true;
endOfComment = isEOF();
if (!isAllowComment() && (isEOF() || !isSafeComment(stringVal))) {
throw new NotAllowCommentException();
}
return;
}
}