/* parses "array[count]" */ static bool ep_parse_param_array(struct effect_parser *ep, struct ep_param *param) { if (!cf_next_valid_token(&ep->cfp)) return false; if (ep->cfp.cur_token->type != CFTOKEN_NUM || !valid_int_str(ep->cfp.cur_token->str.array, ep->cfp.cur_token->str.len)) return false; param->array_count =(int)strtol(ep->cfp.cur_token->str.array, NULL, 10); if (cf_next_token_should_be(&ep->cfp, "]", ";", NULL) == PARSE_EOF) return false; if (!cf_next_valid_token(&ep->cfp)) return false; return true; }
/* parses "array[count]" */ static bool sp_parse_param_array(struct shader_parser *sp, struct shader_var *param) { if (!cf_next_valid_token(&sp->cfp)) return false; if (sp->cfp.cur_token->type != CFTOKEN_NUM || !valid_int_str(sp->cfp.cur_token->str.array, sp->cfp.cur_token->str.len)) return false; param->array_count =(int)strtol(sp->cfp.cur_token->str.array, NULL, 10); if (cf_next_token_should_be(&sp->cfp, "]", ";", NULL) == PARSE_EOF) return false; if (!cf_next_valid_token(&sp->cfp)) return false; return true; }