Skip to content

Commit ca5efe9

Browse files
committed
Fix translation of expression #63
1 parent dbe74cb commit ca5efe9

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
<!--
8282
- [Expressions](expression.md)
8383
-->
84-
- [式文](expression.md)
84+
- [](expression.md)
8585

8686
<!--
8787
- [Flow of Control](flow_control.md)

src/expression.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
# Expressions
33
-->
4-
# 式文
4+
#
55

66
<!--
77
A Rust program is (mostly) made up of a series of statements:
@@ -20,7 +20,7 @@ fn main() {
2020
There are a few kinds of statements in Rust. The most common two are declaring
2121
a variable binding, and using a `;` with an expression:
2222
-->
23-
宣言文にはいくつかの種類があります。最も一般的なのは変数の束縛(`variable binding`)と式文(`expression`)で、いずれも行末に`;`が付きます
23+
宣言文にはいくつかの種類があります。最も一般的なのは変数の束縛(`variable binding`)`;`付きの式(`expression`)です
2424

2525
```
2626
fn main() {
@@ -29,7 +29,7 @@ fn main() {
2929
let x = 5;
3030
3131
// expression;
32-
// 式文
32+
// 式;
3333
x;
3434
x + 1;
3535
15;
@@ -53,7 +53,7 @@ fn main() {
5353
let x_cube = x_squared * x;
5454
5555
// This expression will be assigned to `y`
56-
// この式文は`y`に代入されます。
56+
// この式は`y`に代入されます。
5757
x_cube + x_squared + x
5858
};
5959

src/flow_control/if_else.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ the boolean condition doesn't need to be surrounded by parentheses, and each
66
condition is followed by a block. `if`-`else` conditionals are expressions,
77
and, all branches must return the same type.
88
-->
9-
`if-else`を用いた条件分岐は他の言語に似ています。多くの言語では条件式の中を括弧でくくる必要がありますが、Rustではその必要はありません。条件式の直後にはブロックが続きます。`if-else`は式文の一種で、いずれの分岐先でも返り値の型は同一でなくてはなりません。
9+
`if-else`を用いた条件分岐は他の言語に似ています。多くの言語では条件式の中を括弧でくくる必要がありますが、Rustではその必要はありません。条件式の直後にはブロックが続きます。`if-else`は式の一種で、いずれの分岐先でも返り値の型は同一でなくてはなりません。
1010

1111
```rust,editable
1212
fn main() {

src/flow_control/match.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn main() {
2929
3030
let boolean = true;
3131
// Match is an expression too
32-
// マッチは式文でもある
32+
// マッチは式でもある
3333
let binary = match boolean {
3434
// The arms of a match must cover all the possible values
3535
// マッチは全ての可能な値をカバーしなくてはならない

src/fn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The final expression in the function will be used as return value.
1515
Alternatively, the `return` statement can be used to return a value earlier
1616
from within the function, even from inside loops or `if`s.
1717
-->
18-
関数内の最後の式文が返り値となります。関数の途中で値を返したい場合は`return`文を使用します。`loop`の最中や`if`文の中からも値を返すことができます。
18+
関数内の最後の式が返り値となります。関数の途中で値を返したい場合は`return`文を使用します。`loop`の最中や`if`文の中からも値を返すことができます。
1919

2020
<!--
2121
Let's rewrite FizzBuzz using functions!
@@ -41,7 +41,7 @@ fn is_divisible_by(lhs: u32, rhs: u32) -> bool {
4141
}
4242
4343
// This is an expression, the `return` keyword is not necessary here
44-
// これは式文であり、`return`キーワードは必要ではない。
44+
// これは式であり、`return`キーワードは必要ではない。
4545
lhs % rhs == 0
4646
}
4747

src/macros/designators.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ macro_rules! print_result {
3838
// The `expr` designator is used for expressions.
3939
// このマクロは`expr`識別子に対応する値を引数として取り、
4040
// その結果を文字列としてプリントする。
41-
// `expr`識別子は式文に対応する
41+
// `expr`識別子は式に対応する
4242
($expression:expr) => {
4343
// `stringify!` will convert the expression *as it is* into a string.
44-
// `stringify!`は式文を *そのままの形で* 文字列に変換する
44+
// `stringify!`は式を *そのままの形で* 文字列に変換する
4545
println!("{:?} = {:?}",
4646
stringify!($expression),
4747
$expression);
@@ -55,7 +55,7 @@ fn main() {
5555
print_result!(1u32 + 1);
5656
5757
// Recall that blocks are expressions too!
58-
// ブロックも式文の一種であることを思い出しましょう!
58+
// ブロックも式の一種であることを思い出しましょう!
5959
print_result!({
6060
let x = 1u32;
6161
@@ -75,7 +75,7 @@ These are some of the available designators:
7575
* `ident` is used for variable/function names
7676
-->
7777
* `block`
78-
* `expr` 式文に使用
78+
* `expr` 式に使用
7979
* `ident` 関数、変数の名前に使用
8080
* `item`
8181
* `literal` is used for literal constants

src/macros/repeat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In the following example, surrounding the matcher with `$(...),+` will
1515
match one or more expression, separated by commas.
1616
Also note that the semicolon is optional on the last case.
1717
-->
18-
以下の例では、マッチ対象を `$(...),+`で囲むことにより、カンマで区切られた1つ以上の式文とマッチします。最後のセミコロンは必須ではないことに注目しましょう。
18+
以下の例では、マッチ対象を `$(...),+`で囲むことにより、カンマで区切られた1つ以上の式とマッチします。最後のセミコロンは必須ではないことに注目しましょう。
1919

2020
```rust,editable
2121
// `min!` will calculate the minimum of any number of arguments.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy