/* If expression is a constant, fills 'v' with its value and returns 1. Otherwise, returns 0.  */
int luaK_exp2const(FuncState *fs, const expdesc *e, TValue *v)
/* If expression is a constant, fills 'v' with its value and returns 1. Otherwise, returns 0.  */
int luaK_exp2const(FuncState *fs, const expdesc *e, TValue *v)
{
    case VFALSE:
      setbfvalue(v);
      return 1;
    case VTRUE:
      setbtvalue(v);
      return 1;
    case VNIL:
      setnilvalue(v);
      return 1;
    case VKSTR: {
      setsvalue(fs->ls->L, v, e->u.strval);
      return 1;
    }
    case VCONST: {
      setobj(fs->ls->L, v, const2val(fs, e));
      return 1;
    }
    default: return tonumeral(e, v);
  }
}