Skip to content

Commit c11a4db

Browse files
committed
Add Token![raw]
1 parent 9f4279f commit c11a4db

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

src/expr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,6 @@ pub(crate) mod parsing {
11511151

11521152
mod kw {
11531153
crate::custom_keyword!(builtin);
1154-
crate::custom_keyword!(raw);
11551154
}
11561155

11571156
// When we're parsing expressions which occur before blocks, like in an if
@@ -1468,7 +1467,7 @@ pub(crate) mod parsing {
14681467

14691468
if input.peek(Token![&]) {
14701469
let and_token: Token![&] = input.parse()?;
1471-
let raw: Option<kw::raw> = if input.peek(kw::raw)
1470+
let raw: Option<Token![raw]> = if input.peek(Token![raw])
14721471
&& (input.peek2(Token![mut]) || input.peek2(Token![const]))
14731472
{
14741473
Some(input.parse()?)

src/token.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ define_keywords! {
721721
"override" pub struct Override
722722
"priv" pub struct Priv
723723
"pub" pub struct Pub
724+
"raw" pub struct Raw
724725
"ref" pub struct Ref
725726
"return" pub struct Return
726727
"Self" pub struct SelfType
@@ -899,6 +900,7 @@ macro_rules! Token {
899900
[override] => { $crate::token::Override };
900901
[priv] => { $crate::token::Priv };
901902
[pub] => { $crate::token::Pub };
903+
[raw] => { $crate::token::Raw };
902904
[ref] => { $crate::token::Ref };
903905
[return] => { $crate::token::Return };
904906
[Self] => { $crate::token::SelfType };

syn.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/debug/gen.rs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)