亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? yyindent.cpp

?? qtopia的源程序,一種嵌入式圖形操作系統(tǒng)
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
	}	if ( !readLine() )	    break;    }    return false;}/*  Returns true if yyLine is an unfinished line; otherwise returns  false.  In many places we'll use the terms "standalone line", "unfinished  line" and "continuation line". The meaning of these should be  evident from this code example:      a = b;    // standalone line      c = d +   // unfinished line	  e +   // unfinished continuation line	  f +   // unfinished continuation line	  g;    // continuation line*/static bool isUnfinishedLine(){    bool unf = false;    YY_SAVE();    if ( yyLine->isEmpty() )	return false;    QChar lastCh = (*yyLine)[(int) yyLine->length() - 1];    if ( QString(QString::fromLatin1("{};")).find(lastCh) == -1 && !yyLine->endsWith(QString::fromLatin1("...")) ) {	/*	  It doesn't end with ';' or similar. If it's neither	  "Q_OBJECT" nor "if ( x )", it must be an unfinished line.	*/	unf = ( yyLine->contains(QString::fromLatin1("Q_OBJECT")) == 0 &&		!matchBracelessControlStatement() );    } else if ( lastCh == QChar(';') ) {	if ( lastParen(*yyLine) == QChar('(') ) {	    /*	      Exception:		  for ( int i = 1; i < 10;	    */	    unf = true;	} else if ( readLine() && yyLine->endsWith(QString::fromLatin1(";")) &&		    lastParen(*yyLine) == QChar('(') ) {	    /*	      Exception:		  for ( int i = 1;			i < 10;	    */	    unf = true;	}    }    YY_RESTORE();    return unf;}/*  Returns true if yyLine is a continuation line; otherwise returns  false.*/static bool isContinuationLine(){    bool cont = false;    YY_SAVE();    if ( readLine() )	cont = isUnfinishedLine();    YY_RESTORE();    return cont;}/*  Returns the recommended indent for the bottom line of yyProgram,  assuming it's a continuation line.  We're trying to align the continuation line against some parenthesis  or other bracked left opened on a previous line, or some interesting  operator such as '='.*/static int indentForContinuationLine(){    int braceDepth = 0;    int delimDepth = 0;    bool leftBraceFollowed = *yyLeftBraceFollows;    for ( int i = 0; i < SmallRoof; i++ ) {	int hook = -1;	int j = yyLine->length();	while ( j > 0 && hook < 0 ) {	    j--;	    QChar ch = (*yyLine)[j];	    switch ( ch.unicode() ) {	    case ')':	    case ']':		delimDepth++;		break;	    case '}':		braceDepth++;		break;	    case '(':	    case '[':		delimDepth--;		/*		  An unclosed delimiter is a good place to align at,		  at least for some styles (including Trolltech's).		*/		if ( delimDepth == -1 )		    hook = j;		break;	    case '{':		braceDepth--;		/*		  A left brace followed by other stuff on the same		  line is typically for an enum or an initializer.		  Such a brace must be treated just like the other		  delimiters.		*/		if ( braceDepth == -1 ) {		    if ( j < (int) yyLine->length() - 1 ) {			hook = j;		    } else {			return 0; // shouldn't happen		    }		}		break;	    case '=':		/*		  An equal sign is a very natural alignment hook		  because it's usually the operator with the lowest		  precedence in statements it appears in. Case in		  point:		      int x = 1 +			      2;		  However, we have to beware of constructs such as		  default arguments and explicit enum constant		  values:		      void foo( int x = 0,				int y = 0 );		  And not		      void foo( int x = 0,				      int y = 0 );		  These constructs are caracterized by a ',' at the		  end of the unfinished lines or by unbalanced		  parentheses.		*/		if ( QString("!=<>").find((*yyLine)[j - 1]) == -1 &&		     (*yyLine)[j + 1] != '=' ) {		    if ( braceDepth == 0 && delimDepth == 0 &&			 j < (int) yyLine->length() - 1 &&			 !yyLine->endsWith(QString::fromLatin1(",")) &&			 (yyLine->contains('(') == yyLine->contains(')')) )			hook = j;		}	    }	}	if ( hook >= 0 ) {	    /*	      Yes, we have a delimiter or an operator to align	      against! We don't really align against it, but rather	      against the following token, if any. In this example,	      the following token is "11":		  int x = ( 11 +			    2 );	      If there is no such token, we use a continuation indent:		  static QRegExp foo( QString(			  "foo foo foo foo foo foo foo foo foo") );	    */	    hook++;	    while ( hook < (int) yyLine->length() ) {		if ( !(*yyLine)[hook].isSpace() )		    return columnForIndex( *yyLine, hook );		hook++;	    }	    return indentOfLine( *yyLine ) + ppContinuationIndentSize;	}	if ( braceDepth != 0 )	    break;	/*	  The line's delimiters are balanced. It looks like a	  continuation line or something.	*/	if ( delimDepth == 0 ) {	    if ( leftBraceFollowed ) {		/*		  We have		      int main()		      {		  or		      Bar::Bar()			  : Foo( x )		      {		  The "{" should be flush left.		*/		if ( !isContinuationLine() )		    return indentOfLine( *yyLine );	    } else if ( isContinuationLine() || yyLine->endsWith(QString::fromLatin1(",")) ) {		/*		  We have		      x = a +			  b +			  c;		  or		      int t[] = {			  1, 2, 3,			  4, 5, 6		  The "c;" should fall right under the "b +", and the		  "4, 5, 6" right under the "1, 2, 3,".		*/		return indentOfLine( *yyLine );	    } else {		/*		  We have		      stream << 1 +			      2;		  We could, but we don't, try to analyze which		  operator has precedence over which and so on, to		  obtain the excellent result		      stream << 1 +				2;		  We do have a special trick above for the assignment		  operator above, though.		*/		return indentOfLine( *yyLine ) + ppContinuationIndentSize;	    }	}	if ( !readLine() )	    break;    }    return 0;}/*  Returns the recommended indent for the bottom line of yyProgram if  that line is standalone (or should be indented likewise).  Indenting a standalone line is tricky, mostly because of braceless  control statements. Grossly, we are looking backwards for a special  line, a "hook line", that we can use as a starting point to indent,  and then modify the indentation level according to the braces met  along the way to that hook.  Let's consider a few examples. In all cases, we want to indent the  bottom line.  Example 1:      x = 1;      y = 2;  The hook line is "x = 1;". We met 0 opening braces and 0 closing  braces. Therefore, "y = 2;" inherits the indent of "x = 1;".  Example 2:      if ( x ) {	  y;  The hook line is "if ( x ) {". No matter what precedes it, "y;" has  to be indented one level deeper than the hook line, since we met one  opening brace along the way.  Example 3:      if ( a )	  while ( b ) {	      c;	  }      d;  To indent "d;" correctly, we have to go as far as the "if ( a )".  Compare with      if ( a ) {	  while ( b ) {	      c;	  }	  d;  Still, we're striving to go back as little as possible to accomodate  people with irregular indentation schemes. A hook line near at hand  is much more reliable than a remote one.*/static int indentForStandaloneLine(){    for ( int i = 0; i < SmallRoof; i++ ) {	if ( !*yyLeftBraceFollows ) {	    YY_SAVE();	    if ( matchBracelessControlStatement() ) {		/*		  The situation is this, and we want to indent "z;":		      if ( x &&			   y )			  z;		  yyLine is "if ( x &&".		*/		return indentOfLine( *yyLine ) + ppIndentSize;	    }	    YY_RESTORE();	}	if ( yyLine->endsWith(QString::fromLatin1(";")) || yyLine->count('{') > 0 ) {	    /*	      The situation is possibly this, and we want to indent	      "z;":		  while ( x )		      y;		  z;	      We return the indent of "while ( x )". In place of "y;",	      any arbitrarily complex compound statement can appear.	    */	    if ( *yyBraceDepth > 0 ) {		do {		    if ( !readLine() )			break;		} while ( *yyBraceDepth > 0 );	    }	    LinizerState hookState;	    while ( isContinuationLine() )		readLine();	    hookState = *yyLinizerState;	    readLine();	    if ( *yyBraceDepth <= 0 ) {		do {		    if ( !matchBracelessControlStatement() )			break;		    hookState = *yyLinizerState;		} while ( readLine() );	    }	    *yyLinizerState = hookState;	    while ( isContinuationLine() )		readLine();	    /*	      Never trust lines containing only '{' or '}', as some	      people (Richard M. Stallman) format them weirdly.	    */	    if ( yyLine->stripWhiteSpace().length() > 1 )		return indentOfLine( *yyLine ) - *yyBraceDepth * ppIndentSize;	}	if ( !readLine() )	    return -*yyBraceDepth * ppIndentSize;    }    return 0;}/*  Constructs global variables used by the indenter.*/static void initializeIndenter(){    literal = new QRegExp( QString::fromLatin1("([\"'])(?:\\\\.|[^\\\\])*\\1") );    literal->setMinimal( true );    label = new QRegExp(	QString::fromLatin1("^\\s*((?:case\\b([^:]|::)+|[a-zA-Z_0-9]+)(?:\\s+slots)?:)(?!:)") );    inlineCComment = new QRegExp( QString::fromLatin1("/\\*.*\\*/") );    inlineCComment->setMinimal( true );    braceX = new QRegExp( QString::fromLatin1("^\\s*\\}\\s*(?:else|catch)\\b") );    iflikeKeyword = new QRegExp( QString::fromLatin1("\\b(?:catch|do|for|if|while)\\b") );    yyLinizerState = new LinizerState;}/*  Destroys global variables used by the indenter.*/static void terminateIndenter(){    delete literal;    delete label;    delete inlineCComment;    delete braceX;    delete iflikeKeyword;    delete yyLinizerState;}/*  Returns the recommended indent for the bottom line of program.  Unless null, typedIn stores the character of yyProgram that  triggered reindentation.  This function works better if typedIn is set properly; it is  slightly more conservative if typedIn is completely wild, and  slighly more liberal if typedIn is always null. The user might be  annoyed by the liberal behavior.*/int indentForBottomLine( const QStringList& program, QChar typedIn ){    if ( program.isEmpty() )	return 0;    initializeIndenter();    yyProgram = new QStringList( program );    startLinizer();    const QString& bottomLine = program.last();    QChar firstCh = firstNonWhiteSpace( bottomLine );    int indent;    if ( bottomLineStartsInCComment() ) {	/*	  The bottom line starts in a C-style comment. Indent it	  smartly, unless the user has already played around with it,	  in which case it's better to leave her stuff alone.	*/	if ( isOnlyWhiteSpace(bottomLine) ) {	    indent = indentWhenBottomLineStartsInCComment();	} else {	    indent = indentOfLine( bottomLine );	}    } else if ( okay(typedIn, '#') && firstCh == QChar('#') ) {	/*	  Preprocessor directives go flush left.	*/	indent = 0;    } else {	if ( isUnfinishedLine() ) {	    indent = indentForContinuationLine();	} else {	    indent = indentForStandaloneLine();	}	if ( okay(typedIn, '}') && firstCh == QChar('}') ) {	    /*	      A closing brace is one level more to the left than the	      code it follows.	    */	    indent -= ppIndentSize;	} else if ( okay(typedIn, ':') ) {	    QRegExp caseLabel(QString::fromLatin1(		"\\s*(?:case\\b(?:[^:]|::)+"		"|(?:public|protected|private|signals|default)(?:\\s+slots)?\\s*"		")?:.*") );	    if ( caseLabel.exactMatch(bottomLine) ) {		/*		  Move a case label (or the ':' in front of a		  constructor initialization list) one level to the		  left, but only if the user did not play around with		  it yet. Some users have exotic tastes in the		  matter, and most users probably are not patient		  enough to wait for the final ':' to format their		  code properly.		  We don't attempt the same for goto labels, as the		  user is probably the middle of "foo::bar". (Who		  uses goto, anyway?)		*/		if ( indentOfLine(bottomLine) <= indent )		    indent -= ppIndentSize;		else		    indent = indentOfLine( bottomLine );	    }	}    }    delete yyProgram;    terminateIndenter();    return QMAX( 0, indent );}#ifdef Q_TEST_YYINDENT/*  Test driver.*/#include <qfile.h>#include <qtextstream.h>#include <errno.h>static QString fileContents( const QString& fileName ){    QFile f( fileName );    if ( !f.open(QIODevice::ReadOnly) ) {	qWarning( "yyindent error: Cannot open file '%s' for reading: %s",		  fileName.latin1(), strerror(errno) );	return QString::null;    }    QTextStream t( &f );    QString contents = t.read();    f.close();    if ( contents.isEmpty() )	qWarning( "yyindent error: File '%s' is empty", fileName.latin1() );    return contents;}int main( int argc, char **argv ){    if ( argc != 2 ) {	qWarning( "usage: yyindent file.cpp" );	return 1;    }    QString code = fileContents( argv[1] );    QStringList program = QStringList::split( '\n', code, true );    QStringList p;    QString out;    while ( !program.isEmpty() && program.last().stripWhiteSpace().isEmpty() )	program.remove( program.fromLast() );    QStringList::ConstIterator line = program.begin();    while ( line != program.end() ) {	p.push_back( *line );	QChar typedIn = firstNonWhiteSpace( *line );	if ( p.last().endsWith(":") )	    typedIn = ':';	int indent = indentForBottomLine( p, typedIn );	if ( !(*line).stripWhiteSpace().isEmpty() ) {	    for ( int j = 0; j < indent; j++ )		out += " ";	    out += (*line).stripWhiteSpace();	}	out += "\n";	++line;    }    while ( out.endsWith("\n") )	out.truncate( out.length() - 1 );    printf( "%s\n", out.latin1() );    return 0;}#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线你懂得| 日韩一区二区电影在线| 成人激情黄色小说| 国产高清不卡一区二区| 麻豆精品视频在线观看视频| 日日夜夜精品视频免费| 亚洲chinese男男1069| 亚洲午夜视频在线| 亚洲一二三级电影| 午夜精品久久久久久久久 | 麻豆视频一区二区| 七七婷婷婷婷精品国产| 日本不卡一二三区黄网| 卡一卡二国产精品| 国产综合色在线| 国产v综合v亚洲欧| 91小视频免费看| 91久久精品网| 3d动漫精品啪啪| 欧美电视剧在线看免费| 久久综合av免费| 国产精品免费视频一区| 亚洲免费大片在线观看| 亚洲一区在线观看免费| 日韩电影免费在线观看网站| 精品一区二区三区蜜桃| 成人aa视频在线观看| 在线一区二区三区四区五区 | 欧美岛国在线观看| 久久亚洲一区二区三区明星换脸| 国产日韩欧美精品综合| 中文字幕一区二区三区av| 亚洲国产日日夜夜| 裸体健美xxxx欧美裸体表演| 国产在线精品一区二区不卡了| 成人黄页毛片网站| 色吧成人激情小说| 日韩欧美激情四射| 国产精品日产欧美久久久久| 亚洲线精品一区二区三区| 99久久伊人网影院| 欧美高清视频一二三区| 久久精品人人做人人爽人人| 亚洲人成网站影音先锋播放| 青青草国产成人av片免费| 国产成人免费视频网站高清观看视频 | 亚洲激情校园春色| 麻豆一区二区三| 91美女在线观看| 日韩欧美在线1卡| 国产精品不卡一区| 久久精品国产99国产| 99久久久久久| 日韩欧美在线不卡| 一区二区三区丝袜| 国产伦精一区二区三区| 在线亚洲一区观看| 欧美极品少妇xxxxⅹ高跟鞋| 午夜天堂影视香蕉久久| 成人午夜看片网址| 日韩三级免费观看| 亚洲综合在线五月| 丰满放荡岳乱妇91ww| 欧美精品在线一区二区三区| 国产精品网站在线播放| 免费高清不卡av| 在线观看免费成人| 中文文精品字幕一区二区| 天堂成人国产精品一区| 成人午夜av电影| 精品第一国产综合精品aⅴ| 亚洲电影中文字幕在线观看| 波多野结衣精品在线| 精品奇米国产一区二区三区| 亚洲国产另类av| 色综合久久久久久久久| 欧美mv日韩mv亚洲| 亚洲chinese男男1069| 91蜜桃网址入口| 亚洲国产成人私人影院tom| 久草这里只有精品视频| 欧美日本乱大交xxxxx| 亚洲精品成人天堂一二三| 成人av动漫在线| 久久久久亚洲蜜桃| 精品亚洲免费视频| 日韩午夜电影在线观看| 亚洲地区一二三色| 中文文精品字幕一区二区| 韩国av一区二区三区在线观看| 欧美日韩免费观看一区三区| 亚洲美女视频在线| 91香蕉视频mp4| 亚洲欧洲三级电影| bt欧美亚洲午夜电影天堂| 久久精品亚洲麻豆av一区二区| 久久国产精品露脸对白| 制服丝袜日韩国产| 日本午夜精品一区二区三区电影| 欧美性感一区二区三区| 亚洲一线二线三线久久久| 欧美性猛交一区二区三区精品| 亚洲精品免费看| 色呦呦一区二区三区| 综合婷婷亚洲小说| 91国在线观看| 亚洲超碰精品一区二区| 7777精品伊人久久久大香线蕉最新版 | 亚洲国产视频直播| 欧美猛男超大videosgay| 午夜精品久久久久久久| 欧美一级黄色大片| 久热成人在线视频| 久久综合色之久久综合| 国产乱色国产精品免费视频| 国产欧美日韩另类视频免费观看 | 精品国产免费一区二区三区香蕉| 卡一卡二国产精品| 国产肉丝袜一区二区| av男人天堂一区| 亚洲国产精品久久不卡毛片| 制服丝袜亚洲色图| 国产麻豆精品在线| 18涩涩午夜精品.www| 国产精品国产成人国产三级 | 91麻豆精品国产91久久久久久| 日韩电影一区二区三区| 久久在线观看免费| 成人激情视频网站| 亚洲最新视频在线播放| 在线播放欧美女士性生活| 精品一区二区三区免费播放| 中文字幕乱码一区二区免费| 一本一道综合狠狠老| 日韩成人免费电影| 国产亚洲精品bt天堂精选| 91麻豆高清视频| 视频一区二区三区中文字幕| 精品国内片67194| 97久久超碰国产精品| 视频一区二区三区中文字幕| 精品国产伦一区二区三区观看方式 | 国产精品综合一区二区三区| 国产精品网站在线观看| 欧美日韩成人综合| 国产精品1区二区.| 夜色激情一区二区| 精品国产一区a| 色综合久久久久久久| 久久精品国产在热久久| 国产精品免费丝袜| 欧美一区二区精品久久911| 国产成人三级在线观看| 午夜国产不卡在线观看视频| 久久久久国产一区二区三区四区| 在线一区二区视频| 国产精品一品二品| 亚洲一区二区三区美女| 久久五月婷婷丁香社区| 色婷婷久久久久swag精品| 欧美日韩一区成人| 成人激情免费视频| 久久精品国产成人一区二区三区| 亚洲人成影院在线观看| 精品国产凹凸成av人网站| 欧美亚洲综合网| 国产a区久久久| 免费久久精品视频| 一区二区三区四区激情| 精品国产一区二区精华| 欧美色大人视频| 成人免费视频网站在线观看| 日日夜夜精品视频免费| 亚洲精品水蜜桃| 国产精品天干天干在线综合| 日韩欧美一级二级三级| 在线观看一区不卡| 北条麻妃一区二区三区| 精品一区二区三区视频在线观看| 亚洲成av人片在线观看| 一区免费观看视频| 国产丝袜在线精品| 日韩欧美久久久| 欧美高清激情brazzers| 欧洲视频一区二区| a4yy欧美一区二区三区| 国产九色sp调教91| 激情六月婷婷久久| 日本中文字幕一区二区视频| 一区二区免费在线播放| 国产精品美女久久久久久久久久久 | 国产精品亲子乱子伦xxxx裸| 欧美变态口味重另类| 3d成人h动漫网站入口| 欧美日韩一区二区三区四区 | 亚洲免费电影在线| 日韩毛片高清在线播放| 国产精品麻豆久久久| 中文字幕av资源一区| 久久精品一级爱片|