private static boolean addVariantSmart(PsiBuilder builder, Object token, boolean force) {
    ErrorState state = ErrorState.get(builder);
    // skip FIRST check in completion mode
    if (state.completionState != null && !force) return false;
    builder.eof();
    if (!state.suppressErrors && state.predicateCount < 2) {
      addVariant(builder, state, token);
    }
    return true;
  }
private static boolean addVariantSmart(PsiBuilder builder, Object token, boolean force)