From f6baf26d618ba6f2a8232d496e6ae58497a9d9e1 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 2 Dec 2020 21:27:41 +0100 Subject: Fixes spacing --- src/scanner.l | 62 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/scanner.l b/src/scanner.l index 85a1f0c..66437bc 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -347,7 +347,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) %x QtPropRead %x QtPropWrite %x ReadInitializer -%x ReadInitializerPtr +%x ReadInitializerPtr %x UNOIDLAttributeBlock %x GetCallType %x CppQuote @@ -2581,22 +2581,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } } -"//"([!/]){B}*{CMD}"}".*|"/*"([!*]){B}*{CMD}"}"[^*]*"*/" { +"//"([!/]){B}*{CMD}"}".*|"/*"([!*]){B}*{CMD}"}"[^*]*"*/" { bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields); // see bug746226 yyextra->commentScanner.close(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr,insideEnum); lineCount(yyscanner); } -"=>" { - if (!yyextra->insideCS) REJECT; - yyextra->current->bodyLine = yyextra->yyLineNr; - yyextra->current->bodyColumn = yyextra->yyColNr; +"=>" { + if (!yyextra->insideCS) REJECT; + yyextra->current->bodyLine = yyextra->yyLineNr; + yyextra->current->bodyColumn = yyextra->yyColNr; yyextra->current->initializer = yytext; - yyextra->lastInitializerContext = YY_START; - yyextra->initBracketCount=0; - yyextra->current->mtype = yyextra->mtype = Property; - yyextra->current->spec |= Entry::Gettable; - BEGIN(ReadInitializerPtr); - } + yyextra->lastInitializerContext = YY_START; + yyextra->initBracketCount=0; + yyextra->current->mtype = yyextra->mtype = Property; + yyextra->current->spec |= Entry::Gettable; + BEGIN(ReadInitializerPtr); + } "=" { // in PHP code this could also be due to "current->bodyLine = yyextra->yyLineNr; yyextra->current->bodyColumn = yyextra->yyColNr; @@ -2615,14 +2615,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(FindMembers); } /* Read initializer rules */ -"(" { +"(" { yyextra->lastRoundContext=YY_START; yyextra->pCopyRoundGString=&yyextra->current->initializer; yyextra->roundCount=0; yyextra->current->initializer+=*yytext; BEGIN(GCopyRound); } -"[" { +"[" { if (!yyextra->insidePHP) REJECT; yyextra->lastSquareContext=YY_START; yyextra->pCopySquareGString=&yyextra->current->initializer; @@ -2630,14 +2630,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->current->initializer+=*yytext; BEGIN(GCopySquare); } -"{" { +"{" { yyextra->lastCurlyContext=YY_START; yyextra->pCopyCurlyGString=&yyextra->current->initializer; yyextra->curlyCount=0; yyextra->current->initializer+=*yytext; BEGIN(GCopyCurly); } -[;,] { +[;,] { //printf(">> initializer '%s' <<\n",yyextra->current->initializer.data()); if (*yytext==';' && (yyextra->current_root->spec&Entry::Enum)) { @@ -2654,13 +2654,13 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) else if (*yytext==';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0)) // yyextra->initBracketCount==0 was added for bug 665778 { unput(*yytext); - if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0); + if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0); BEGIN(yyextra->lastInitializerContext); } else if (*yytext==',' && yyextra->initBracketCount==0) // for "int a=0,b=0" { unput(*yytext); - if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0); + if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0); BEGIN(yyextra->lastInitializerContext); } else @@ -2668,7 +2668,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->current->initializer+=*yytext; } } -{RAWBEGIN} { // C++11 raw string +{RAWBEGIN} { // C++11 raw string if (!yyextra->insideCpp) { REJECT; @@ -2728,7 +2728,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->fullArgString+=yytext; lineCount(yyscanner); } -\" { +\" { if (yyextra->insideIDL && yyextra->insideCppQuote) { BEGIN(EndCppQuote); @@ -2741,24 +2741,24 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(CopyGString); } } -"->" { +"->" { yyextra->current->initializer+=yytext; } -"<<" { +"<<" { yyextra->current->initializer+=yytext; } -">>" { +">>" { yyextra->current->initializer+=yytext; } -[<\[{(] { +[<\[{(] { yyextra->initBracketCount++; yyextra->current->initializer+=*yytext; } -[>\]})] { +[>\]})] { yyextra->initBracketCount--; yyextra->current->initializer+=*yytext; } -\' { +\' { if (yyextra->insidePHP) { yyextra->current->initializer+=yytext; @@ -2781,11 +2781,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->current->initializer+=yytext; } } -\n { +\n { yyextra->current->initializer+=*yytext; lineCount(yyscanner); } -"@\"" { +"@\"" { //printf("yyextra->insideCS=%d\n",yyextra->insideCS); yyextra->current->initializer+=yytext; if (!yyextra->insideCS && !yyextra->insideObjC) @@ -2817,13 +2817,13 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) . { *yyextra->pSkipVerbString+=*yytext; } -"?>" { +"?>" { if (yyextra->insidePHP) BEGIN( FindMembersPHP ); else yyextra->current->initializer+=yytext; } -. { +. { yyextra->current->initializer+=*yytext; } @@ -5076,7 +5076,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) lineCount(yyscanner); //addToBody(yytext); } -"<<<" { +"<<<" { if (!yyextra->insidePHP) { REJECT; -- cgit v0.12