* peek at the next word to determine if it is a C# non-paren header. * will look ahead in the input file if necessary. * * @param char position on currentLine to start the search * @return true if the next word is get or set. */
| 3001 | * @return true if the next word is get or set. |
| 3002 | */ |
| 3003 | bool ASFormatter::isNextWordSharpNonParenHeader(int startChar) const |
| 3004 | { |
| 3005 | // look ahead to find the next non-comment text |
| 3006 | string nextText = peekNextText(currentLine.substr(startChar)); |
| 3007 | if (nextText.length() == 0) |
| 3008 | return false; |
| 3009 | if (nextText[0] == '[') |
| 3010 | return true; |
| 3011 | if (!isCharPotentialHeader(nextText, 0)) |
| 3012 | return false; |
| 3013 | if (findKeyword(nextText, 0, AS_GET) || findKeyword(nextText, 0, AS_SET) |
| 3014 | || findKeyword(nextText, 0, AS_ADD) || findKeyword(nextText, 0, AS_REMOVE)) |
| 3015 | return true; |
| 3016 | return false; |
| 3017 | } |
| 3018 | |
| 3019 | /** |
| 3020 | * peek at the next char to determine if it is an opening bracket. |
nothing calls this directly
no outgoing calls
no test coverage detected