improved sql format output

This commit is contained in:
shaojin.wensj
2015-07-11 14:27:29 +08:00
parent 60b7139911
commit b36374f7bf
26 changed files with 612 additions and 35 deletions
@@ -106,6 +106,9 @@ public class SQLServerLexer extends Lexer {
stringVal = subString(mark, bufPos);
token = Token.MULTI_LINE_COMMENT;
hasComment = true;
if (keepComments) {
commentVal = stringVal;
}
}
if (token != Token.HINT && !isAllowComment() && !isSafeComment(stringVal)) {
@@ -145,6 +148,9 @@ public class SQLServerLexer extends Lexer {
stringVal = subString(mark + 1, bufPos);
token = Token.LINE_COMMENT;
hasComment = true;
if (keepComments) {
commentVal = stringVal;
}
endOfComment = isEOF();
if (!isAllowComment() && (isEOF() || !isSafeComment(stringVal))) {