Skip to content

Commit 706ed6d

Browse files
committed
auto merge of #5583 : jbclements/rust/docfix-for-block-comment-grammar, r=jbclements
... by adding Kleene '+' in two places, and changing a "non-slash" into "non_slash_or_star". Closes #1588
2 parents 5da9e12 + dcb8fa8 commit 706ed6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: doc/rust.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ but a small number are defined in terms of Unicode properties or explicit codepo
125125
## Special Unicode Productions
126126

127127
The following productions in the Rust grammar are defined in terms of Unicode properties:
128-
`ident`, `non_null`, `non_star`, `non_eol`, `non_slash`, `non_single_quote` and `non_double_quote`.
128+
`ident`, `non_null`, `non_star`, `non_eol`, `non_slash_or_star`, `non_single_quote` and `non_double_quote`.
129129

130130
### Identifiers
131131

@@ -147,16 +147,16 @@ Some productions are defined by exclusion of particular Unicode characters:
147147
- `non_null` is any single Unicode character aside from `U+0000` (null)
148148
- `non_eol` is `non_null` restricted to exclude `U+000A` (`'\n'`)
149149
- `non_star` is `non_null` restricted to exclude `U+002A` (`*`)
150-
- `non_slash` is `non_null` restricted to exclude `U+002F` (`/`)
150+
- `non_slash_or_star` is `non_null` restricted to exclude `U+002F` (`/`) and `U+002A` (`*`)
151151
- `non_single_quote` is `non_null` restricted to exclude `U+0027` (`'`)
152152
- `non_double_quote` is `non_null` restricted to exclude `U+0022` (`"`)
153153

154154
## Comments
155155

156156
~~~~~~~~ {.ebnf .gram}
157157
comment : block_comment | line_comment ;
158-
block_comment : "/*" block_comment_body * "*/" ;
159-
block_comment_body : non_star * | '*' non_slash ;
158+
block_comment : "/*" block_comment_body * '*' + '/' ;
159+
block_comment_body : non_star * | '*' + non_slash_or_star ;
160160
line_comment : "//" non_eol * ;
161161
~~~~~~~~
162162

0 commit comments

Comments
 (0)