/* Look for an active local variable with the name 'n' in the function 'fs'. If found, initialize 'var' with it and return its expression kind; otherwise return -1.  */
static int searchvar(FuncState *fs, TString *n, expdesc *var)
/* Look for an active local variable with the name 'n' in the function 'fs'. If found, initialize 'var' with it and return its expression kind; otherwise return -1.  */
static int searchvar(FuncState *fs, TString *n, expdesc *var)
{
    Vardesc *vd = getlocalvardesc(fs, i);
    if (eqstr(n, vd->vd.name)) {
      if (vd->vd.kind == RDKCTC)
        init_exp(var, VCONST, fs->firstlocal + i);
      else
        init_var(fs, var, i);
      return var->k;
    }
  }
  return -1;
}