Check if an operator follows the next word. The next word must be a legal name.
| 6353 | // Check if an operator follows the next word. |
| 6354 | // The next word must be a legal name. |
| 6355 | const string* ASFormatter::getFollowingOperator() const |
| 6356 | { |
| 6357 | // find next word |
| 6358 | size_t nextNum = currentLine.find_first_not_of(" \t", charNum + 1); |
| 6359 | if (nextNum == string::npos) |
| 6360 | return NULL; |
| 6361 | |
| 6362 | if (!isLegalNameChar(currentLine[nextNum])) |
| 6363 | return NULL; |
| 6364 | |
| 6365 | // bypass next word and following spaces |
| 6366 | while (nextNum < currentLine.length()) |
| 6367 | { |
| 6368 | if (!isLegalNameChar(currentLine[nextNum]) |
| 6369 | && !isWhiteSpace(currentLine[nextNum])) |
| 6370 | break; |
| 6371 | nextNum++; |
| 6372 | } |
| 6373 | |
| 6374 | if (nextNum >= currentLine.length() |
| 6375 | || !isCharPotentialOperator(currentLine[nextNum]) |
| 6376 | || currentLine[nextNum] == '/') // comment |
| 6377 | return NULL; |
| 6378 | |
| 6379 | const string* newOperator = ASBeautifier::findOperator(currentLine, nextNum, operators); |
| 6380 | return newOperator; |
| 6381 | } |
| 6382 | |
| 6383 | // Check following data to determine if the current character is an array operator. |
| 6384 | bool ASFormatter::isArrayOperator() const |
nothing calls this directly
no outgoing calls
no test coverage detected