librime-lua icon indicating copy to clipboard operation
librime-lua copied to clipboard

added SetReg method

Open shewer opened this issue 1 year ago • 1 comments

  • Create obj

    • Set()
    • Set({})
    • Set( ...) --> Set({...})
  • methods

    • obj_set:keys() -- return list of key
    • obj_set:set(key) -- return self
    • obj_unset:(key) -- return self
  • operator

    • << : obj_set = Set() << key1 << key2 << key3 -- set
    • >> : obj_set = Set() >> key1 >> key2 ; -- unset
    • & : obj_set1 & obj_set2 --> return obj_set3
    • | : obj_set1 | obj_set2 --> return obj_set3
    • == : obj_set1 == obj_set2 --> return bool

shewer avatar Mar 30 '24 06:03 shewer

我觉得这些修改必要性不大。一方面是因为 SetReg 的功能已经完备了;另一方面 SetReg 原意只是一个最小的实现,方便 包装 C++ 接口,并不追求使用上的便利。

hchunhui avatar Apr 13 '24 03:04 hchunhui