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

Function par_subscript

src/gpre/sqe.cpp:3081–3112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3079//
3080
3081static gpre_nod* par_subscript( gpre_req* request)
3082{
3083 assert_IS_REQ(request);
3084
3085 ref* reference = (ref*) MSC_alloc(REF_LEN);
3086 gpre_nod* node = MSC_unary(nod_value, (gpre_nod*) reference);
3087
3088 // Special case literals
3089
3090 if (gpreGlob.token_global.tok_type == tok_number)
3091 {
3092 node->nod_type = nod_literal;
3093 char* string = (TEXT *) MSC_alloc(gpreGlob.token_global.tok_length + 1);
3094 reference->ref_value = string;
3095 MSC_copy(gpreGlob.token_global.tok_string, gpreGlob.token_global.tok_length, string);
3096 PAR_get_token();
3097 return node;
3098 }
3099
3100 if (!MSC_match(KW_COLON))
3101 CPR_s_error("<colon>");
3102
3103 reference->ref_value = PAR_native_value(false, false);
3104
3105 if (request)
3106 {
3107 reference->ref_next = request->req_values;
3108 request->req_values = reference;
3109 }
3110
3111 return node;
3112}
3113
3114//____________________________________________________________
3115//

Callers 1

SQE_fieldFunction · 0.85

Calls 7

MSC_allocFunction · 0.85
MSC_unaryFunction · 0.85
MSC_copyFunction · 0.85
PAR_get_tokenFunction · 0.85
MSC_matchFunction · 0.85
CPR_s_errorFunction · 0.85
PAR_native_valueFunction · 0.85

Tested by

no test coverage detected