| 45 | } |
| 46 | |
| 47 | static bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) { |
| 48 | if (ch == '\'' || ch == '"') |
| 49 | return true; |
| 50 | if (IsPyStringTypeChar(ch, allowed)) { |
| 51 | if (chNext == '"' || chNext == '\'') |
| 52 | return true; |
| 53 | if ((chNext == 'r' || chNext == 'R') && (chNext2 == '"' || chNext2 == '\'')) |
| 54 | return true; |
| 55 | } |
| 56 | if ((ch == 'r' || ch == 'R') && (chNext == '"' || chNext == '\'')) |
| 57 | return true; |
| 58 | |
| 59 | return false; |
| 60 | } |
| 61 | |
| 62 | /* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */ |
| 63 | static int GetPyStringState(Accessor &styler, int i, unsigned int *nextIndex, literalsAllowed allowed) { |
no test coverage detected