Skip to content

Commit 95264a1

Browse files
committed
Fix comments
1 parent f70bf36 commit 95264a1

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

codegen/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ pub fn derive_custom_type(input: TokenStream) -> TokenStream {
312312
/// Macro to automatically expose a Rust function, type-def or use statement as `pub` when under the
313313
/// `internals` feature.
314314
///
315-
/// If the `internals` is not enabled, the item will be exposed as `pub(crate)`.
315+
/// If the `internals` feature is not enabled, the item will be exposed as `pub(crate)`.
316316
///
317317
/// In order to avoid confusion, there must not be any visibility modifier on the item.
318318
#[proc_macro_attribute]

src/tokenizer.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,23 +1195,23 @@ pub trait InputStream {
11951195
///
11961196
/// # Returns
11971197
///
1198-
/// | Type | Return Value |`state.is_within_text_terminated_by` |
1199-
/// |---------------------------|:-----------------------------------:|:------------------------------------:|
1200-
/// |`#"hello"#` |`StringConstant("hello")` |`None` |
1201-
/// |`#"hello`_{EOF}_ |`StringConstant("hello")` |`Some("#")` |
1202-
/// |`####"hello`_{EOF}_ |`StringConstant("hello")` |`Some("####")` |
1203-
/// |`#" "hello" "`_{EOF}_ |`LexError` |`None` |
1204-
/// |`#""hello""#` |`StringConstant("\"hello\"")` |`None` |
1205-
/// |`##"hello #"# world"##` |`StringConstant("hello #\"# world")` |`None` |
1206-
/// |`#"R"#` |`StringConstant("R")` |`None` |
1207-
/// |`#"\x52"#` |`StringConstant("\\x52")` |`None` |
1198+
/// | Type | Return Value |`state.is_within_text_terminated_by` |
1199+
/// |---------------------------|:------------------------------------------------------------:|:------------------------------------:|
1200+
/// |`#"hello"#` |[`StringConstant("hello")`][Token::StringConstant] |`None` |
1201+
/// |`#"hello`_{EOF}_ |[`StringConstant("hello")`][Token::StringConstant] |`Some("#")` |
1202+
/// |`####"hello`_{EOF}_ |[`StringConstant("hello")`][Token::StringConstant] |`Some("####")` |
1203+
/// |`#" "hello" "`_{EOF}_ |[`LexError`] |`None` |
1204+
/// |`#""hello""#` |[`StringConstant("\"hello\"")`][Token::StringConstant] |`None` |
1205+
/// |`##"hello #"# world"##` |[`StringConstant("hello #\"# world")`][Token::StringConstant] |`None` |
1206+
/// |`#"R"#` |[`StringConstant("R")`][Token::StringConstant] |`None` |
1207+
/// |`#"\x52"#` |[`StringConstant("\\x52")`][Token::StringConstant] |`None` |
12081208
///
1209-
/// This function does _not_ throw a `LexError` for an unterminated raw string at _{EOF}_
1209+
/// This function does _not_ throw a [`LexError`] for an unterminated raw string at _{EOF}_
12101210
///
12111211
/// This is to facilitate using this function to parse a script line-by-line, where the end of the
12121212
/// line (i.e. _{EOF}_) is not necessarily the end of the script.
12131213
///
1214-
/// Any time a [`StringConstant`][`Token::StringConstant`] is returned with
1214+
/// Any time a [`StringConstant`][Token::StringConstant] is returned with
12151215
/// `state.is_within_text_terminated_by` set to `Some(_)` is one of the above conditions.
12161216
pub fn parse_raw_string_literal(
12171217
stream: &mut (impl InputStream + ?Sized),
@@ -1321,18 +1321,18 @@ pub fn parse_raw_string_literal(
13211321
///
13221322
/// # Returns
13231323
///
1324-
/// | Type | Return Value |`state.is_within_text_terminated_by`|
1325-
/// |---------------------------------|:--------------------------:|:----------------------------------:|
1326-
/// |`"hello"` |`StringConstant("hello")` |`None` |
1327-
/// |`"hello`_{LF}_ or _{EOF}_ |`LexError` |`None` |
1328-
/// |`"hello\`_{EOF}_ or _{LF}{EOF}_ |`StringConstant("hello")` |`Some('"')` |
1329-
/// |`` `hello``_{EOF}_ |`StringConstant("hello")` |``Some('`')`` |
1330-
/// |`` `hello``_{LF}{EOF}_ |`StringConstant("hello\n")` |``Some('`')`` |
1331-
/// |`` `hello ${`` |`InterpolatedString("hello ")`<br/>next token is `{`|`None` |
1332-
/// |`` } hello` `` |`StringConstant(" hello")` |`None` |
1333-
/// |`} hello`_{EOF}_ |`StringConstant(" hello")` |``Some('`')`` |
1324+
/// | Type | Return Value |`state.is_within_text_terminated_by`|
1325+
/// |---------------------------------|:---------------------------------------------------:|:----------------------------------:|
1326+
/// |`"hello"` |[`StringConstant("hello")`][Token::StringConstant] |`None` |
1327+
/// |`"hello`_{LF}_ or _{EOF}_ |[`LexError`] |`None` |
1328+
/// |`"hello\`_{EOF}_ or _{LF}{EOF}_ |[`StringConstant("hello")`][Token::StringConstant] |`Some('"')` |
1329+
/// |`` `hello``_{EOF}_ |[`StringConstant("hello")`][Token::StringConstant] |``Some('`')`` |
1330+
/// |`` `hello``_{LF}{EOF}_ |[`StringConstant("hello\n")`][Token::StringConstant] |``Some('`')`` |
1331+
/// |`` `hello ${`` |[`InterpolatedString("hello ")`][Token::InterpolatedString]<br/>next token is `{`|`None` |
1332+
/// |`` } hello` `` |[`StringConstant(" hello")`][Token::StringConstant] |`None` |
1333+
/// |`} hello`_{EOF}_ |[`StringConstant(" hello")`][Token::StringConstant] |``Some('`')`` |
13341334
///
1335-
/// This function does not throw a `LexError` for the following conditions:
1335+
/// This function does not throw a [`LexError`] for the following conditions:
13361336
///
13371337
/// * Unterminated literal string at _{EOF}_
13381338
///
@@ -1341,7 +1341,7 @@ pub fn parse_raw_string_literal(
13411341
/// This is to facilitate using this function to parse a script line-by-line, where the end of the
13421342
/// line (i.e. _{EOF}_) is not necessarily the end of the script.
13431343
///
1344-
/// Any time a [`StringConstant`][`Token::StringConstant`] is returned with
1344+
/// Any time a [`StringConstant`][Token::StringConstant] is returned with
13451345
/// `state.is_within_text_terminated_by` set to `Some(_)` is one of the above conditions.
13461346
pub fn parse_string_literal(
13471347
stream: &mut (impl InputStream + ?Sized),

0 commit comments

Comments
 (0)