Skip to content

Commit

Permalink
docs: add for statement and some other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
v420v committed Dec 15, 2024
1 parent fea27ee commit 12c9834
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ $ make init
$ git clone git@github.com:v420v/ibu.git
$ cd ibu
$ make up
$ make ibulang
$ make ibu
$ make init
```

| Command | Execution |
|-----------|------------------------|
| `make up` | `docker compose up -d` |
| `make ibulang` | `docker compose exec ibulang bash` |
| `make ibu` | `docker compose exec ibulang bash` |
| `make down` | `docker compose down` |

## Usage
Expand Down
15 changes: 13 additions & 2 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ $ make init
$ git clone git@github.com:v420v/ibu.git
$ cd ibu
$ make up
$ make ibulang
$ make ibu
$ make init
```

| Command | Execution |
|-----------|------------------------|
| `make up` | `docker compose up -d` |
| `make ibulang` | `docker compose exec ibulang bash` |
| `make ibu` | `docker compose exec ibulang bash` |
| `make down` | `docker compose down` |

## Usage
Expand Down Expand Up @@ -218,6 +218,17 @@ label:
}
```

### Example 3
```
#include "std/header.ibu"
func main() i32 {
for let i i32 = 0; i < 10; i++ {
printf("%d\n", i);
}
}
```

## Variable length args
Variable length args can be accessed with built-in variables `argv` and `argc`.

Expand Down
15 changes: 13 additions & 2 deletions docs/docs_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ $ make init
$ git clone git@github.com:v420v/ibu.git
$ cd ibu
$ make up
$ make ibulang
$ make ibu
$ make init
```

| コマンド | 実行内容 |
|-----------|------------------------|
| `make up` | `docker compose up -d` |
| `make ibulang` | `docker compose exec ibulang bash` |
| `make ibu` | `docker compose exec ibulang bash` |
| `make down` | `docker compose down` |

## コンパイラの使い方
Expand Down Expand Up @@ -219,6 +219,17 @@ label:
}
```

### 例3
```
#include "std/header.ibu"
func main() i32 {
for let i i32 = 0; i < 10; i++ {
printf("%d\n", i);
}
}
```

## 可変長引数
可変長引数には、組み込み変数 `argv` `argc`でアクセスできます。

Expand Down

0 comments on commit 12c9834

Please sign in to comment.