MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / extract_string

Function extract_string

src/gpre/sql.cpp:5350–5370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5348//
5349
5350static 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

Callers 2

act_declare_filterFunction · 0.85
act_declare_udfFunction · 0.85

Calls 5

isQuotedFunction · 0.85
CPR_s_errorFunction · 0.85
MSC_allocFunction · 0.85
MSC_copyFunction · 0.85
PAR_get_tokenFunction · 0.85

Tested by

no test coverage detected