code: function validateTypeAmong(startPos, endPos, x, types) {
    /* Succeed if the type of x is in the list 'types' */
    for (let type of types) {
      if (joinTypes(x.type(), type) !== null) {
        return;
      }
    }
    /* Report error */
    fail(startPos, endPos,
      'expected-value-of-some-type-but-got', [
        types,
        x.type()
      ]
    );
  }
docs: /* Validate that the type of 'x' is among the given list of types