| 27 | } |
| 28 | |
| 29 | static bool IsPyStringStart(int ch, int chNext, int chNext2) { |
| 30 | if (ch == '\'' || ch == '"') |
| 31 | return true; |
| 32 | if (ch == 'u' || ch == 'U') { |
| 33 | if (chNext == '"' || chNext == '\'') |
| 34 | return true; |
| 35 | if ((chNext == 'r' || chNext == 'R') && (chNext2 == '"' || chNext2 == '\'')) |
| 36 | return true; |
| 37 | } |
| 38 | if ((ch == 'r' || ch == 'R') && (chNext == '"' || chNext == '\'')) |
| 39 | return true; |
| 40 | |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | /* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */ |
| 45 | static int GetPyStringState(Accessor &styler, int i, unsigned int *nextIndex) { |