From: <mrj...@us...> - 2007-12-29 01:32:21
|
Revision: 2401 http://tora.svn.sourceforge.net/tora/?rev=2401&view=rev Author: mrjohnson0 Date: 2007-12-28 17:31:46 -0800 (Fri, 28 Dec 2007) Log Message: ----------- stop indenting my danged pg casts Modified Paths: -------------- branches/tora-1.4/tora/src/tosqlparse.cpp Modified: branches/tora-1.4/tora/src/tosqlparse.cpp =================================================================== --- branches/tora-1.4/tora/src/tosqlparse.cpp 2007-12-28 23:24:34 UTC (rev 2400) +++ branches/tora-1.4/tora/src/tosqlparse.cpp 2007-12-29 01:31:46 UTC (rev 2401) @@ -455,6 +455,7 @@ ">>", "..", "<>", + "::", "!=", "~=", "^=", @@ -1264,8 +1265,8 @@ { comment = AddComment(comment, (*i).Comment); QString upp = (*i).String.upper(); + #ifdef TOPARSE_DEBUG - printf("%s\n", (const char*)(*i).String.latin1()); #endif @@ -1284,6 +1285,10 @@ ret += t; any = true; } + else if ((*i).String == ("::")) { + ret += (*i).String; + current += 2; + } else if ((*i).String == (",")) { if (Settings.CommaBefore) @@ -1405,26 +1410,26 @@ else { if (ret.length() > 0 && - !ret.at(ret.length() - 1).isSpace() && - (Settings.OperatorSpace || ((toIsIdent(t[0]) || - t[0] == syntax.quoteCharacter() || t[0] == '\'') && - (toIsIdent(ret.at(ret.length() - 1)) || - ret.at(ret.length() - 1) == syntax.quoteCharacter() || - ret.at(ret.length() - 1) == '\'') - ) - ) - ) + !ret.at(ret.length() - 1).isSpace() && + !(ret.at(ret.length() - 1) == ':') && + (Settings.OperatorSpace || ((toIsIdent(t[0]) || + t[0] == syntax.quoteCharacter() || t[0] == '\'') && + (toIsIdent(ret.at(ret.length() - 1)) || + ret.at(ret.length() - 1) == syntax.quoteCharacter() || + ret.at(ret.length() - 1) == '\'')))) { if (t != (";") && - t != (".") && - ret.at(ret.length() - 1) != '.' && - current != 0) + t != (".") && + ret.at(ret.length() - 1) != '.' && + current != 0) { current++; ret += (" "); } } - else if (ret.length() > 2 && ret.at(ret.length() - 2) == '*' && ret.at(ret.length() - 1) == '/') + else if (ret.length() > 2 && + ret.at(ret.length() - 2) == '*' && + ret.at(ret.length() - 1) == '/') { current++; ret += (" "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |