tests: add parser/vm bitops tests; docs: update cheatsheet and language guide for bitwise ops and shift; note Arrow(>>) removal
- Add src/tests/parser_bitops_test.rs and vm_bitops_test.rs - Update tokenizer unit test to expect SHIFT_RIGHT - Update quick-reference and language guide to document &,|,^,<<,>> and Arrow deprecation Known: one unrelated test failing (consolebox println TLV vs typebox) pre-existing.
This commit is contained in:
@ -245,4 +245,14 @@ local result = await future # 結果待機
|
||||
- 変数は必ず宣言してから使う
|
||||
- ループは`loop(condition)`のみ
|
||||
- 親メソッドは`from Parent.method()`で呼ぶ
|
||||
- カンマ忘れに注意!
|
||||
- カンマ忘れに注意!
|
||||
### ビット演算子(整数限定)
|
||||
```nyash
|
||||
a & b # ビットAND
|
||||
a | b # ビットOR
|
||||
a ^ b # ビットXOR
|
||||
a << n # 左シフト(n は 0..63 にマスク)
|
||||
a >> n # 右シフト(現在は論理シフト相当の実装)
|
||||
```
|
||||
|
||||
注意: 旧来の `>>`(ARROW 演算子)は廃止されました。パイプラインは `|>` を使用してください。
|
||||
|
||||
Reference in New Issue
Block a user