Skip to content

Commit b4f40a6

Browse files
committed
fixed grammar of Rust target.
1 parent 242e3c7 commit b4f40a6

File tree

5 files changed

+85
-5
lines changed

5 files changed

+85
-5
lines changed

docs/writing-reactors/a-first-reactor.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ The general structure of a reactor definition is as follows:
9494
timer <name>([<offset>[, <period>]])
9595
logical action <name>[: <type>]
9696
physical action <name>[: <type>]
97+
[const] method <name>(parameters):<type> {= ... body ...=}
9798
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
9899
<instance-name> = new <class-name>([<parameter-assignments>])
99100
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
100101
}
101102
```
102103
</ShowIf>
103-
<ShowIf cpp rs>
104+
<ShowIf cpp>
104105
```lf
105106
[main] reactor <class-name> [(parameters)] {
106107
input <name>: <type>
@@ -116,6 +117,21 @@ The general structure of a reactor definition is as follows:
116117
}
117118
```
118119
</ShowIf>
120+
<ShowIf rs>
121+
```lf
122+
[main] reactor <class-name> [(parameters)] {
123+
input <name>: <type>
124+
output <name>: <type>
125+
state <name>: <type> [= <value>]
126+
timer <name>([<offset>[, <period>]])
127+
logical action <name>[: <type>]
128+
physical action <name>[: <type>]
129+
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
130+
<instance-name> = new <class-name>([<parameter-assignments>])
131+
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
132+
}
133+
```
134+
</ShowIf>
119135
<ShowIf py>
120136
```lf
121137
[main or federated] reactor <class-name> [(parameters)] {

versioned_docs/version-0.5.0/writing-reactors/a-first-reactor.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ The general structure of a reactor definition is as follows:
9494
timer <name>([<offset>[, <period>]])
9595
logical action <name>[: <type>]
9696
physical action <name>[: <type>]
97+
[const] method <name>(parameters):<type> {= ... body ...=}
9798
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
9899
<instance-name> = new <class-name>([<parameter-assignments>])
99100
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
100101
}
101102
```
102103
</ShowIf>
103-
<ShowIf cpp rs>
104+
<ShowIf cpp>
104105
```lf
105106
[main] reactor <class-name> [(parameters)] {
106107
input <name>: <type>
@@ -116,6 +117,21 @@ The general structure of a reactor definition is as follows:
116117
}
117118
```
118119
</ShowIf>
120+
<ShowIf rs>
121+
```lf
122+
[main] reactor <class-name> [(parameters)] {
123+
input <name>: <type>
124+
output <name>: <type>
125+
state <name>: <type> [= <value>]
126+
timer <name>([<offset>[, <period>]])
127+
logical action <name>[: <type>]
128+
physical action <name>[: <type>]
129+
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
130+
<instance-name> = new <class-name>([<parameter-assignments>])
131+
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
132+
}
133+
```
134+
</ShowIf>
119135
<ShowIf py>
120136
```lf
121137
[main or federated] reactor <class-name> [(parameters)] {

versioned_docs/version-0.6.0/writing-reactors/a-first-reactor.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ The general structure of a reactor definition is as follows:
9494
timer <name>([<offset>[, <period>]])
9595
logical action <name>[: <type>]
9696
physical action <name>[: <type>]
97+
[const] method <name>(parameters):<type> {= ... body ...=}
9798
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
9899
<instance-name> = new <class-name>([<parameter-assignments>])
99100
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
100101
}
101102
```
102103
</ShowIf>
103-
<ShowIf cpp rs>
104+
<ShowIf cpp>
104105
```lf
105106
[main] reactor <class-name> [(parameters)] {
106107
input <name>: <type>
@@ -116,6 +117,21 @@ The general structure of a reactor definition is as follows:
116117
}
117118
```
118119
</ShowIf>
120+
<ShowIf rs>
121+
```lf
122+
[main] reactor <class-name> [(parameters)] {
123+
input <name>: <type>
124+
output <name>: <type>
125+
state <name>: <type> [= <value>]
126+
timer <name>([<offset>[, <period>]])
127+
logical action <name>[: <type>]
128+
physical action <name>[: <type>]
129+
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
130+
<instance-name> = new <class-name>([<parameter-assignments>])
131+
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
132+
}
133+
```
134+
</ShowIf>
119135
<ShowIf py>
120136
```lf
121137
[main or federated] reactor <class-name> [(parameters)] {

versioned_docs/version-0.7.0/writing-reactors/a-first-reactor.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ The general structure of a reactor definition is as follows:
9494
timer <name>([<offset>[, <period>]])
9595
logical action <name>[: <type>]
9696
physical action <name>[: <type>]
97+
[const] method <name>(parameters):<type> {= ... body ...=}
9798
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
9899
<instance-name> = new <class-name>([<parameter-assignments>])
99100
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
100101
}
101102
```
102103
</ShowIf>
103-
<ShowIf cpp rs>
104+
<ShowIf cpp>
104105
```lf
105106
[main] reactor <class-name> [(parameters)] {
106107
input <name>: <type>
@@ -116,6 +117,21 @@ The general structure of a reactor definition is as follows:
116117
}
117118
```
118119
</ShowIf>
120+
<ShowIf rs>
121+
```lf
122+
[main] reactor <class-name> [(parameters)] {
123+
input <name>: <type>
124+
output <name>: <type>
125+
state <name>: <type> [= <value>]
126+
timer <name>([<offset>[, <period>]])
127+
logical action <name>[: <type>]
128+
physical action <name>[: <type>]
129+
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
130+
<instance-name> = new <class-name>([<parameter-assignments>])
131+
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
132+
}
133+
```
134+
</ShowIf>
119135
<ShowIf py>
120136
```lf
121137
[main or federated] reactor <class-name> [(parameters)] {

versioned_docs/version-0.8.0/writing-reactors/a-first-reactor.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ The general structure of a reactor definition is as follows:
9494
timer <name>([<offset>[, <period>]])
9595
logical action <name>[: <type>]
9696
physical action <name>[: <type>]
97+
[const] method <name>(parameters):<type> {= ... body ...=}
9798
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
9899
<instance-name> = new <class-name>([<parameter-assignments>])
99100
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
100101
}
101102
```
102103
</ShowIf>
103-
<ShowIf cpp rs>
104+
<ShowIf cpp>
104105
```lf
105106
[main] reactor <class-name> [(parameters)] {
106107
input <name>: <type>
@@ -116,6 +117,21 @@ The general structure of a reactor definition is as follows:
116117
}
117118
```
118119
</ShowIf>
120+
<ShowIf rs>
121+
```lf
122+
[main] reactor <class-name> [(parameters)] {
123+
input <name>: <type>
124+
output <name>: <type>
125+
state <name>: <type> [= <value>]
126+
timer <name>([<offset>[, <period>]])
127+
logical action <name>[: <type>]
128+
physical action <name>[: <type>]
129+
reaction [<name>] (triggers) [<uses>] [-> <effects>] [{= ... body ...=}]
130+
<instance-name> = new <class-name>([<parameter-assignments>])
131+
<port-name> [, ...] -> <port-name> [, ...] [after <delay>]
132+
}
133+
```
134+
</ShowIf>
119135
<ShowIf py>
120136
```lf
121137
[main or federated] reactor <class-name> [(parameters)] {

0 commit comments

Comments
 (0)