| 5348 | // |
| 5349 | |
| 5350 | static TEXT* extract_string(bool advance_token) |
| 5351 | { |
| 5352 | switch (gpreGlob.sw_sql_dialect) |
| 5353 | { |
| 5354 | case 1: |
| 5355 | if (!isQuoted(gpreGlob.token_global.tok_type)) |
| 5356 | CPR_s_error("<string>"); |
| 5357 | break; |
| 5358 | |
| 5359 | default: |
| 5360 | if (gpreGlob.token_global.tok_type != tok_sglquoted) |
| 5361 | CPR_s_error("<string>"); |
| 5362 | break; |
| 5363 | } |
| 5364 | |
| 5365 | TEXT* string = (TEXT*) MSC_alloc(gpreGlob.token_global.tok_length + 1); |
| 5366 | MSC_copy(gpreGlob.token_global.tok_string, gpreGlob.token_global.tok_length, string); |
| 5367 | if (advance_token) |
| 5368 | PAR_get_token(); |
| 5369 | return string; |
| 5370 | } |
| 5371 | |
| 5372 | |
| 5373 |
no test coverage detected