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:
Tomoaki
2025-09-08 04:04:19 +09:00
parent 08d9b71297
commit 17225c29f7
5 changed files with 62 additions and 3 deletions

View File

@ -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 演算子)は廃止されました。パイプラインは `|>` を使用してください。