function createCallExpressionParser(...validators) {
  return function (encoded, returnType, context) {
    const operator = encoded[0];

    /**
     * @type {Array<Expression>}
     */
    let args;
    for (let i = 0; i < validators.length; i++) {
      const parsed = validators[i](encoded, returnType, context);
      if (i == validators.length - 1) {
        if (!parsed) {
          throw new Error(
            'expected last argument validator to return the parsed args',
          );
        }
        args = parsed;
      }
    }
    return new CallExpression(returnType, operator, ...args);
  };
}
@param {Array<ArgValidator>} validators A chain of argument validators.  The last validator is expected
to return the parsed arguments.
@return {Parser} The parser.