Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/en/references/keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ let match = null // Error
print('hoge')
} // Error
```
```aiscript
let obj = {
default: true
} // Since 1.1.0: it works when used as a key in object literals

obj.default = false // Error (property access notation not supported yet)
obj["default"] = false // This works
```

## Words in Use and Words Planned for Use
The keywords `match` and `for` are already used as keywords in the grammar.
Expand Down
3 changes: 3 additions & 0 deletions docs/en/references/std-math.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ The change in behavior by specifying `options.algorithm` is shown below:
| `rc4_legacy` | RC4 | Range limitation by floating-point arithmetic (pre-0.19.0 algorithm) |
| Not specified, or `chacha20` | ChaCha20 | Rejection Sampling |

**Note:** In JavaScript environments where [`crypto`](https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto)[`.subtle`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle) is not available—such as in non-[secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts)—only `rc4_legacy` can be used, and the default will also be changed to `rc4_legacy`.


```aiscript playground
let rng = Math:gen_rng('AICHAN')

Expand Down
8 changes: 8 additions & 0 deletions docs/ja/references/keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ let match = null // エラー
print('hoge')
} // エラー
```
```aiscript
let obj = {
default: true
} // 1.1.0より、オブジェクトリテラルのキーとしての利用は可能

obj.default = false // エラー(プロパティアクセス記法は未対応)
obj["default"] = false // こちらは可
```

## 使用中の語と使用予定の語
`match`や`for`は文法中で既にキーワードとして使用されています。
Expand Down
2 changes: 2 additions & 0 deletions docs/ja/references/std-math.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ _options_ に渡したオブジェクトを通じて、内部の挙動を指定
| `rc4_legacy` | RC4 | 浮動小数点数演算による範囲制限​(0.19.0以前のアルゴリズム) |
| 無指定 または 'chacha20' | ChaCha20 | Rejection Sampling |

なお、**非[セキュアコンテクスト](https://developer.mozilla.org/ja/docs/Web/Security/Secure_Contexts)などの[`crypto`](https://developer.mozilla.org/ja/docs/Web/API/Window/crypto)[`.subtle`](https://developer.mozilla.org/ja/docs/Web/API/Crypto/subtle)が利用できないJavascript環境下では`rc4_legacy`のみが利用可能**となり、デフォルトも`rc4_legacy`に変更されます。

```aiscript playground
let rng = Math:gen_rng('AICHAN')

Expand Down