phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
@ -46,7 +46,7 @@ result = add(10, 5)
|
||||
## 🛠️ コマンドラインツール
|
||||
```bash
|
||||
# 基本変換
|
||||
nyash-transpile input.py -o output.nyash
|
||||
nyash-transpile input.py -o output.hako
|
||||
|
||||
# 変換統計付き
|
||||
nyash-transpile --stats complex.py
|
||||
|
||||
@ -21,7 +21,7 @@ for i in range(10):
|
||||
↓ 変換
|
||||
|
||||
```nyash
|
||||
# output.nyash
|
||||
# output.hako
|
||||
function calculate(x, y) {
|
||||
local result
|
||||
result = x * 2 + y
|
||||
@ -74,7 +74,7 @@ impl PythonParserBox {
|
||||
### コマンドライン版
|
||||
```bash
|
||||
# PythonファイルをNyashに変換
|
||||
nyash-transpile input.py -o output.nyash
|
||||
nyash-transpile input.py -o output.hako
|
||||
|
||||
# 標準出力に出力
|
||||
nyash-transpile script.py
|
||||
@ -94,7 +94,7 @@ local python_code = FileBox.read("algorithm.py")
|
||||
local nyash_code = transpiler.to_nyash_source(python_code)
|
||||
|
||||
// ファイルに保存
|
||||
FileBox.write("algorithm.nyash", nyash_code)
|
||||
FileBox.write("algorithm.hako", nyash_code)
|
||||
|
||||
// または直接実行
|
||||
eval(nyash_code)
|
||||
|
||||
Reference in New Issue
Block a user