Check following data to determine if the current character is an array operator.
| 6382 | |
| 6383 | // Check following data to determine if the current character is an array operator. |
| 6384 | bool ASFormatter::isArrayOperator() const |
| 6385 | { |
| 6386 | assert(currentChar == '*' || currentChar == '&' || currentChar == '^'); |
| 6387 | assert(isBracketType(bracketTypeStack->back(), ARRAY_TYPE)); |
| 6388 | |
| 6389 | // find next word |
| 6390 | size_t nextNum = currentLine.find_first_not_of(" \t", charNum + 1); |
| 6391 | if (nextNum == string::npos) |
| 6392 | return NULL; |
| 6393 | |
| 6394 | if (!isLegalNameChar(currentLine[nextNum])) |
| 6395 | return NULL; |
| 6396 | |
| 6397 | // bypass next word and following spaces |
| 6398 | while (nextNum < currentLine.length()) |
| 6399 | { |
| 6400 | if (!isLegalNameChar(currentLine[nextNum]) |
| 6401 | && !isWhiteSpace(currentLine[nextNum])) |
| 6402 | break; |
| 6403 | nextNum++; |
| 6404 | } |
| 6405 | |
| 6406 | // check for characters that indicate an operator |
| 6407 | if (currentLine[nextNum] == ',' |
| 6408 | || currentLine[nextNum] == '}' |
| 6409 | || currentLine[nextNum] == ')' |
| 6410 | || currentLine[nextNum] == '(') |
| 6411 | return true; |
| 6412 | return false; |
| 6413 | } |
| 6414 | |
| 6415 | // Reset the flags that indicate various statement information. |
| 6416 | void ASFormatter::resetEndOfStatement() |
nothing calls this directly
no outgoing calls
no test coverage detected