[Squirrel-sql-commits] sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql QueryTokenizer.java,1.6,1.7
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Gerd W. <ger...@us...> - 2005-10-24 18:05:53
|
Update of /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv486/fw/src/net/sourceforge/squirrel_sql/fw/sql Modified Files: QueryTokenizer.java Log Message: Fixed bug #1331445 a bit more ;-) Index: QueryTokenizer.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/QueryTokenizer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** QueryTokenizer.java 24 Oct 2005 04:51:22 -0000 1.6 --- QueryTokenizer.java 24 Oct 2005 18:05:44 -0000 1.7 *************** *** 50,59 **** /////////////////////////////////////////////////////////// // Handling of comments - if(false == isInLineComment && false == isInMultiLineComment) - { - // We look forward - isInMultiLineComment = sql.startsWith(MULTI_LINE_COMMENT_BEGIN, i); - isInLineComment = sql.startsWith(lineCommentBegin, i); - } // We look backwards --- 50,53 ---- *************** *** 69,72 **** --- 63,74 ---- } + + if(false == isInLineComment && false == isInMultiLineComment) + { + // We look forward + isInMultiLineComment = sql.startsWith(MULTI_LINE_COMMENT_BEGIN, i); + isInLineComment = sql.startsWith(lineCommentBegin, i); + } + if(isInMultiLineComment || isInLineComment) { *************** *** 206,210 **** // public static void main(String[] args) // { ! // String sql = "A'''' sss ; GO ;; GO'"; // //String sql = "GO GO"; // --- 208,213 ---- // public static void main(String[] args) // { ! // //String sql = "A'''' sss ; GO ;; GO'"; ! // String sql = "A\n--x\n--y\n/*\n*/B"; // //String sql = "GO GO"; // |