IF we read ' or " then we have to get prepared to read everything until the next ' or " If we read a char then -> state 8; Stay here while we read WS
(char currChar)
| 266 | * Stay here while we read WS |
| 267 | */ |
| 268 | private void doState6(char currChar){ |
| 269 | if ( ('\'' == currChar) || ('"' == currChar) ){ |
| 270 | endPair = currChar; |
| 271 | if ('\'' == currChar){ |
| 272 | |
| 273 | // we have to replace ' with " |
| 274 | m_modifier = m_modifier.replace(m_cursor - 1, m_cursor,"\""); |
| 275 | } |
| 276 | m_currState = 7; |
| 277 | } |
| 278 | if ( ('\'' != currChar) && ('"' != currChar) && !isWhiteSpace(currChar)){ |
| 279 | |
| 280 | // this means that curChar is any char |
| 281 | m_currState = 8; |
| 282 | |
| 283 | // every value must be inside this pair"" |
| 284 | m_modifier.insert(m_cursor - 1, '"'); |
| 285 | |
| 286 | // insert implies the modification of m_cursor |
| 287 | // we increment m_cursor in order to say in the same position and to |
| 288 | // anulate the efect of insert. |
| 289 | m_cursor ++; |
| 290 | } |
| 291 | }// doState6 |
| 292 | |
| 293 | /** |
| 294 | * If we find the pair ' or " go to state 9 |
no test coverage detected