mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Rename DotDotPat -> RestPat
This commit is contained in:
parent
215b9b9ccc
commit
22d295ceaa
14 changed files with 55 additions and 55 deletions
|
@ -826,7 +826,7 @@ impl ExprCollector<'_> {
|
||||||
Pat::Missing
|
Pat::Missing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast::Pat::DotDotPat(_) => {
|
ast::Pat::RestPat(_) => {
|
||||||
// `DotDotPat` requires special handling and should not be mapped
|
// `DotDotPat` requires special handling and should not be mapped
|
||||||
// to a Pat. Here we are using `Pat::Missing` as a fallback for
|
// to a Pat. Here we are using `Pat::Missing` as a fallback for
|
||||||
// when `DotDotPat` is mapped to `Pat`, which can easily happen
|
// when `DotDotPat` is mapped to `Pat`, which can easily happen
|
||||||
|
@ -853,10 +853,10 @@ impl ExprCollector<'_> {
|
||||||
fn collect_tuple_pat(&mut self, args: AstChildren<ast::Pat>) -> (Vec<PatId>, Option<usize>) {
|
fn collect_tuple_pat(&mut self, args: AstChildren<ast::Pat>) -> (Vec<PatId>, Option<usize>) {
|
||||||
// Find the location of the `..`, if there is one. Note that we do not
|
// Find the location of the `..`, if there is one. Note that we do not
|
||||||
// consider the possiblity of there being multiple `..` here.
|
// consider the possiblity of there being multiple `..` here.
|
||||||
let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::DotDotPat(_)));
|
let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::RestPat(_)));
|
||||||
// We want to skip the `..` pattern here, since we account for it above.
|
// We want to skip the `..` pattern here, since we account for it above.
|
||||||
let args = args
|
let args = args
|
||||||
.filter(|p| !matches!(p, ast::Pat::DotDotPat(_)))
|
.filter(|p| !matches!(p, ast::Pat::RestPat(_)))
|
||||||
.map(|p| self.collect_pat(p))
|
.map(|p| self.collect_pat(p))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
|
@ -577,7 +577,7 @@ fn highlight_element(
|
||||||
_ if element.parent().and_then(ast::RangePat::cast).is_some() => {
|
_ if element.parent().and_then(ast::RangePat::cast).is_some() => {
|
||||||
HighlightTag::Operator.into()
|
HighlightTag::Operator.into()
|
||||||
}
|
}
|
||||||
_ if element.parent().and_then(ast::DotDotPat::cast).is_some() => {
|
_ if element.parent().and_then(ast::RestPat::cast).is_some() => {
|
||||||
HighlightTag::Operator.into()
|
HighlightTag::Operator.into()
|
||||||
}
|
}
|
||||||
_ if element.parent().and_then(ast::Attr::cast).is_some() => {
|
_ if element.parent().and_then(ast::Attr::cast).is_some() => {
|
||||||
|
|
|
@ -192,7 +192,7 @@ fn record_field_pat_list(p: &mut Parser) {
|
||||||
p.bump(T!['{']);
|
p.bump(T!['{']);
|
||||||
while !p.at(EOF) && !p.at(T!['}']) {
|
while !p.at(EOF) && !p.at(T!['}']) {
|
||||||
match p.current() {
|
match p.current() {
|
||||||
// A trailing `..` is *not* treated as a DOT_DOT_PAT.
|
// A trailing `..` is *not* treated as a REST_PAT.
|
||||||
T![.] if p.at(T![..]) => p.bump(T![..]),
|
T![.] if p.at(T![..]) => p.bump(T![..]),
|
||||||
T!['{'] => error_block(p, "expected ident"),
|
T!['{'] => error_block(p, "expected ident"),
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ fn dot_dot_pat(p: &mut Parser) -> CompletedMarker {
|
||||||
assert!(p.at(T![..]));
|
assert!(p.at(T![..]));
|
||||||
let m = p.start();
|
let m = p.start();
|
||||||
p.bump(T![..]);
|
p.bump(T![..]);
|
||||||
m.complete(p, DOT_DOT_PAT)
|
m.complete(p, REST_PAT)
|
||||||
}
|
}
|
||||||
|
|
||||||
// test ref_pat
|
// test ref_pat
|
||||||
|
|
|
@ -158,7 +158,7 @@ pub enum SyntaxKind {
|
||||||
BOX_PAT,
|
BOX_PAT,
|
||||||
IDENT_PAT,
|
IDENT_PAT,
|
||||||
WILDCARD_PAT,
|
WILDCARD_PAT,
|
||||||
DOT_DOT_PAT,
|
REST_PAT,
|
||||||
PATH_PAT,
|
PATH_PAT,
|
||||||
RECORD_PAT,
|
RECORD_PAT,
|
||||||
RECORD_PAT_FIELD_LIST,
|
RECORD_PAT_FIELD_LIST,
|
||||||
|
|
|
@ -1130,10 +1130,10 @@ impl BoxPat {
|
||||||
pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
|
pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct DotDotPat {
|
pub struct RestPat {
|
||||||
pub(crate) syntax: SyntaxNode,
|
pub(crate) syntax: SyntaxNode,
|
||||||
}
|
}
|
||||||
impl DotDotPat {
|
impl RestPat {
|
||||||
pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
|
pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
|
@ -1336,7 +1336,7 @@ pub enum Stmt {
|
||||||
pub enum Pat {
|
pub enum Pat {
|
||||||
IdentPat(IdentPat),
|
IdentPat(IdentPat),
|
||||||
BoxPat(BoxPat),
|
BoxPat(BoxPat),
|
||||||
DotDotPat(DotDotPat),
|
RestPat(RestPat),
|
||||||
LiteralPat(LiteralPat),
|
LiteralPat(LiteralPat),
|
||||||
MacroPat(MacroPat),
|
MacroPat(MacroPat),
|
||||||
OrPat(OrPat),
|
OrPat(OrPat),
|
||||||
|
@ -2577,8 +2577,8 @@ impl AstNode for BoxPat {
|
||||||
}
|
}
|
||||||
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
||||||
}
|
}
|
||||||
impl AstNode for DotDotPat {
|
impl AstNode for RestPat {
|
||||||
fn can_cast(kind: SyntaxKind) -> bool { kind == DOT_DOT_PAT }
|
fn can_cast(kind: SyntaxKind) -> bool { kind == REST_PAT }
|
||||||
fn cast(syntax: SyntaxNode) -> Option<Self> {
|
fn cast(syntax: SyntaxNode) -> Option<Self> {
|
||||||
if Self::can_cast(syntax.kind()) {
|
if Self::can_cast(syntax.kind()) {
|
||||||
Some(Self { syntax })
|
Some(Self { syntax })
|
||||||
|
@ -3141,8 +3141,8 @@ impl From<IdentPat> for Pat {
|
||||||
impl From<BoxPat> for Pat {
|
impl From<BoxPat> for Pat {
|
||||||
fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
|
fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
|
||||||
}
|
}
|
||||||
impl From<DotDotPat> for Pat {
|
impl From<RestPat> for Pat {
|
||||||
fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) }
|
fn from(node: RestPat) -> Pat { Pat::RestPat(node) }
|
||||||
}
|
}
|
||||||
impl From<LiteralPat> for Pat {
|
impl From<LiteralPat> for Pat {
|
||||||
fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
|
fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
|
||||||
|
@ -3183,7 +3183,7 @@ impl From<TupleStructPat> for Pat {
|
||||||
impl AstNode for Pat {
|
impl AstNode for Pat {
|
||||||
fn can_cast(kind: SyntaxKind) -> bool {
|
fn can_cast(kind: SyntaxKind) -> bool {
|
||||||
match kind {
|
match kind {
|
||||||
IDENT_PAT | BOX_PAT | DOT_DOT_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT
|
IDENT_PAT | BOX_PAT | REST_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT
|
||||||
| PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT
|
| PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT
|
||||||
| TUPLE_PAT | TUPLE_STRUCT_PAT => true,
|
| TUPLE_PAT | TUPLE_STRUCT_PAT => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
|
@ -3193,7 +3193,7 @@ impl AstNode for Pat {
|
||||||
let res = match syntax.kind() {
|
let res = match syntax.kind() {
|
||||||
IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
|
IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
|
||||||
BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
|
BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
|
||||||
DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }),
|
REST_PAT => Pat::RestPat(RestPat { syntax }),
|
||||||
LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
|
LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
|
||||||
MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
|
MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
|
||||||
OR_PAT => Pat::OrPat(OrPat { syntax }),
|
OR_PAT => Pat::OrPat(OrPat { syntax }),
|
||||||
|
@ -3214,7 +3214,7 @@ impl AstNode for Pat {
|
||||||
match self {
|
match self {
|
||||||
Pat::IdentPat(it) => &it.syntax,
|
Pat::IdentPat(it) => &it.syntax,
|
||||||
Pat::BoxPat(it) => &it.syntax,
|
Pat::BoxPat(it) => &it.syntax,
|
||||||
Pat::DotDotPat(it) => &it.syntax,
|
Pat::RestPat(it) => &it.syntax,
|
||||||
Pat::LiteralPat(it) => &it.syntax,
|
Pat::LiteralPat(it) => &it.syntax,
|
||||||
Pat::MacroPat(it) => &it.syntax,
|
Pat::MacroPat(it) => &it.syntax,
|
||||||
Pat::OrPat(it) => &it.syntax,
|
Pat::OrPat(it) => &it.syntax,
|
||||||
|
@ -3990,7 +3990,7 @@ impl std::fmt::Display for BoxPat {
|
||||||
std::fmt::Display::fmt(self.syntax(), f)
|
std::fmt::Display::fmt(self.syntax(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl std::fmt::Display for DotDotPat {
|
impl std::fmt::Display for RestPat {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
std::fmt::Display::fmt(self.syntax(), f)
|
std::fmt::Display::fmt(self.syntax(), f)
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,15 +293,15 @@ impl ast::SlicePat {
|
||||||
let mut args = self.args().peekable();
|
let mut args = self.args().peekable();
|
||||||
let prefix = args
|
let prefix = args
|
||||||
.peeking_take_while(|p| match p {
|
.peeking_take_while(|p| match p {
|
||||||
ast::Pat::DotDotPat(_) => false,
|
ast::Pat::RestPat(_) => false,
|
||||||
ast::Pat::IdentPat(bp) => match bp.pat() {
|
ast::Pat::IdentPat(bp) => match bp.pat() {
|
||||||
Some(ast::Pat::DotDotPat(_)) => false,
|
Some(ast::Pat::RestPat(_)) => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
},
|
},
|
||||||
ast::Pat::RefPat(rp) => match rp.pat() {
|
ast::Pat::RefPat(rp) => match rp.pat() {
|
||||||
Some(ast::Pat::DotDotPat(_)) => false,
|
Some(ast::Pat::RestPat(_)) => false,
|
||||||
Some(ast::Pat::IdentPat(bp)) => match bp.pat() {
|
Some(ast::Pat::IdentPat(bp)) => match bp.pat() {
|
||||||
Some(ast::Pat::DotDotPat(_)) => false,
|
Some(ast::Pat::RestPat(_)) => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
},
|
},
|
||||||
_ => true,
|
_ => true,
|
||||||
|
|
|
@ -81,7 +81,7 @@ SOURCE_FILE@0..103
|
||||||
NAME_REF@87..90
|
NAME_REF@87..90
|
||||||
IDENT@87..90 "Bar"
|
IDENT@87..90 "Bar"
|
||||||
L_PAREN@90..91 "("
|
L_PAREN@90..91 "("
|
||||||
DOT_DOT_PAT@91..93
|
REST_PAT@91..93
|
||||||
DOT2@91..93 ".."
|
DOT2@91..93 ".."
|
||||||
R_PAREN@93..94 ")"
|
R_PAREN@93..94 ")"
|
||||||
WHITESPACE@94..95 " "
|
WHITESPACE@94..95 " "
|
||||||
|
|
|
@ -26,7 +26,7 @@ SOURCE_FILE@0..39
|
||||||
IDENT@24..25 "b"
|
IDENT@24..25 "b"
|
||||||
COMMA@25..26 ","
|
COMMA@25..26 ","
|
||||||
WHITESPACE@26..27 " "
|
WHITESPACE@26..27 " "
|
||||||
DOT_DOT_PAT@27..29
|
REST_PAT@27..29
|
||||||
DOT2@27..29 ".."
|
DOT2@27..29 ".."
|
||||||
R_BRACK@29..30 "]"
|
R_BRACK@29..30 "]"
|
||||||
WHITESPACE@30..31 " "
|
WHITESPACE@30..31 " "
|
||||||
|
|
|
@ -83,7 +83,7 @@ SOURCE_FILE@0..97
|
||||||
UNDERSCORE@78..79 "_"
|
UNDERSCORE@78..79 "_"
|
||||||
COMMA@79..80 ","
|
COMMA@79..80 ","
|
||||||
WHITESPACE@80..81 " "
|
WHITESPACE@80..81 " "
|
||||||
DOT_DOT_PAT@81..83
|
REST_PAT@81..83
|
||||||
DOT2@81..83 ".."
|
DOT2@81..83 ".."
|
||||||
WHITESPACE@83..84 " "
|
WHITESPACE@83..84 " "
|
||||||
COMMA@84..85 ","
|
COMMA@84..85 ","
|
||||||
|
|
|
@ -26,7 +26,7 @@ SOURCE_FILE@0..94
|
||||||
IDENT@24..25 "b"
|
IDENT@24..25 "b"
|
||||||
COMMA@25..26 ","
|
COMMA@25..26 ","
|
||||||
WHITESPACE@26..27 " "
|
WHITESPACE@26..27 " "
|
||||||
DOT_DOT_PAT@27..29
|
REST_PAT@27..29
|
||||||
DOT2@27..29 ".."
|
DOT2@27..29 ".."
|
||||||
R_PAREN@29..30 ")"
|
R_PAREN@29..30 ")"
|
||||||
WHITESPACE@30..31 " "
|
WHITESPACE@30..31 " "
|
||||||
|
@ -60,7 +60,7 @@ SOURCE_FILE@0..94
|
||||||
WHITESPACE@63..64 " "
|
WHITESPACE@63..64 " "
|
||||||
TUPLE_PAT@64..68
|
TUPLE_PAT@64..68
|
||||||
L_PAREN@64..65 "("
|
L_PAREN@64..65 "("
|
||||||
DOT_DOT_PAT@65..67
|
REST_PAT@65..67
|
||||||
DOT2@65..67 ".."
|
DOT2@65..67 ".."
|
||||||
R_PAREN@67..68 ")"
|
R_PAREN@67..68 ")"
|
||||||
WHITESPACE@68..69 " "
|
WHITESPACE@68..69 " "
|
||||||
|
|
|
@ -14,7 +14,7 @@ SOURCE_FILE@0..555
|
||||||
LET_STMT@16..28
|
LET_STMT@16..28
|
||||||
LET_KW@16..19 "let"
|
LET_KW@16..19 "let"
|
||||||
WHITESPACE@19..20 " "
|
WHITESPACE@19..20 " "
|
||||||
DOT_DOT_PAT@20..22
|
REST_PAT@20..22
|
||||||
DOT2@20..22 ".."
|
DOT2@20..22 ".."
|
||||||
WHITESPACE@22..23 " "
|
WHITESPACE@22..23 " "
|
||||||
EQ@23..24 "="
|
EQ@23..24 "="
|
||||||
|
@ -40,7 +40,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@66..67 "a"
|
IDENT@66..67 "a"
|
||||||
COMMA@67..68 ","
|
COMMA@67..68 ","
|
||||||
WHITESPACE@68..69 " "
|
WHITESPACE@68..69 " "
|
||||||
DOT_DOT_PAT@69..71
|
REST_PAT@69..71
|
||||||
DOT2@69..71 ".."
|
DOT2@69..71 ".."
|
||||||
R_PAREN@71..72 ")"
|
R_PAREN@71..72 ")"
|
||||||
WHITESPACE@72..73 " "
|
WHITESPACE@72..73 " "
|
||||||
|
@ -61,7 +61,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@88..89 "a"
|
IDENT@88..89 "a"
|
||||||
COMMA@89..90 ","
|
COMMA@89..90 ","
|
||||||
WHITESPACE@90..91 " "
|
WHITESPACE@90..91 " "
|
||||||
DOT_DOT_PAT@91..93
|
REST_PAT@91..93
|
||||||
DOT2@91..93 ".."
|
DOT2@91..93 ".."
|
||||||
COMMA@93..94 ","
|
COMMA@93..94 ","
|
||||||
R_PAREN@94..95 ")"
|
R_PAREN@94..95 ")"
|
||||||
|
@ -87,7 +87,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@116..117 "a"
|
IDENT@116..117 "a"
|
||||||
COMMA@117..118 ","
|
COMMA@117..118 ","
|
||||||
WHITESPACE@118..119 " "
|
WHITESPACE@118..119 " "
|
||||||
DOT_DOT_PAT@119..121
|
REST_PAT@119..121
|
||||||
DOT2@119..121 ".."
|
DOT2@119..121 ".."
|
||||||
R_PAREN@121..122 ")"
|
R_PAREN@121..122 ")"
|
||||||
WHITESPACE@122..123 " "
|
WHITESPACE@122..123 " "
|
||||||
|
@ -112,7 +112,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@143..144 "a"
|
IDENT@143..144 "a"
|
||||||
COMMA@144..145 ","
|
COMMA@144..145 ","
|
||||||
WHITESPACE@145..146 " "
|
WHITESPACE@145..146 " "
|
||||||
DOT_DOT_PAT@146..148
|
REST_PAT@146..148
|
||||||
DOT2@146..148 ".."
|
DOT2@146..148 ".."
|
||||||
COMMA@148..149 ","
|
COMMA@148..149 ","
|
||||||
R_PAREN@149..150 ")"
|
R_PAREN@149..150 ")"
|
||||||
|
@ -129,11 +129,11 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@164..165 " "
|
WHITESPACE@164..165 " "
|
||||||
TUPLE_PAT@165..173
|
TUPLE_PAT@165..173
|
||||||
L_PAREN@165..166 "("
|
L_PAREN@165..166 "("
|
||||||
DOT_DOT_PAT@166..168
|
REST_PAT@166..168
|
||||||
DOT2@166..168 ".."
|
DOT2@166..168 ".."
|
||||||
COMMA@168..169 ","
|
COMMA@168..169 ","
|
||||||
WHITESPACE@169..170 " "
|
WHITESPACE@169..170 " "
|
||||||
DOT_DOT_PAT@170..172
|
REST_PAT@170..172
|
||||||
DOT2@170..172 ".."
|
DOT2@170..172 ".."
|
||||||
R_PAREN@172..173 ")"
|
R_PAREN@172..173 ")"
|
||||||
WHITESPACE@173..174 " "
|
WHITESPACE@173..174 " "
|
||||||
|
@ -153,11 +153,11 @@ SOURCE_FILE@0..555
|
||||||
NAME_REF@188..193
|
NAME_REF@188..193
|
||||||
IDENT@188..193 "Tuple"
|
IDENT@188..193 "Tuple"
|
||||||
L_PAREN@193..194 "("
|
L_PAREN@193..194 "("
|
||||||
DOT_DOT_PAT@194..196
|
REST_PAT@194..196
|
||||||
DOT2@194..196 ".."
|
DOT2@194..196 ".."
|
||||||
COMMA@196..197 ","
|
COMMA@196..197 ","
|
||||||
WHITESPACE@197..198 " "
|
WHITESPACE@197..198 " "
|
||||||
DOT_DOT_PAT@198..200
|
REST_PAT@198..200
|
||||||
DOT2@198..200 ".."
|
DOT2@198..200 ".."
|
||||||
R_PAREN@200..201 ")"
|
R_PAREN@200..201 ")"
|
||||||
WHITESPACE@201..202 " "
|
WHITESPACE@201..202 " "
|
||||||
|
@ -173,7 +173,7 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@215..216 " "
|
WHITESPACE@215..216 " "
|
||||||
TUPLE_PAT@216..227
|
TUPLE_PAT@216..227
|
||||||
L_PAREN@216..217 "("
|
L_PAREN@216..217 "("
|
||||||
DOT_DOT_PAT@217..219
|
REST_PAT@217..219
|
||||||
DOT2@217..219 ".."
|
DOT2@217..219 ".."
|
||||||
COMMA@219..220 ","
|
COMMA@219..220 ","
|
||||||
WHITESPACE@220..221 " "
|
WHITESPACE@220..221 " "
|
||||||
|
@ -182,7 +182,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@221..222 "a"
|
IDENT@221..222 "a"
|
||||||
COMMA@222..223 ","
|
COMMA@222..223 ","
|
||||||
WHITESPACE@223..224 " "
|
WHITESPACE@223..224 " "
|
||||||
DOT_DOT_PAT@224..226
|
REST_PAT@224..226
|
||||||
DOT2@224..226 ".."
|
DOT2@224..226 ".."
|
||||||
R_PAREN@226..227 ")"
|
R_PAREN@226..227 ")"
|
||||||
WHITESPACE@227..228 " "
|
WHITESPACE@227..228 " "
|
||||||
|
@ -202,7 +202,7 @@ SOURCE_FILE@0..555
|
||||||
NAME_REF@242..247
|
NAME_REF@242..247
|
||||||
IDENT@242..247 "Tuple"
|
IDENT@242..247 "Tuple"
|
||||||
L_PAREN@247..248 "("
|
L_PAREN@247..248 "("
|
||||||
DOT_DOT_PAT@248..250
|
REST_PAT@248..250
|
||||||
DOT2@248..250 ".."
|
DOT2@248..250 ".."
|
||||||
COMMA@250..251 ","
|
COMMA@250..251 ","
|
||||||
WHITESPACE@251..252 " "
|
WHITESPACE@251..252 " "
|
||||||
|
@ -211,7 +211,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@252..253 "a"
|
IDENT@252..253 "a"
|
||||||
COMMA@253..254 ","
|
COMMA@253..254 ","
|
||||||
WHITESPACE@254..255 " "
|
WHITESPACE@254..255 " "
|
||||||
DOT_DOT_PAT@255..257
|
REST_PAT@255..257
|
||||||
DOT2@255..257 ".."
|
DOT2@255..257 ".."
|
||||||
R_PAREN@257..258 ")"
|
R_PAREN@257..258 ")"
|
||||||
WHITESPACE@258..259 " "
|
WHITESPACE@258..259 " "
|
||||||
|
@ -233,7 +233,7 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@300..301 " "
|
WHITESPACE@300..301 " "
|
||||||
SLICE_PAT@301..305
|
SLICE_PAT@301..305
|
||||||
L_BRACK@301..302 "["
|
L_BRACK@301..302 "["
|
||||||
DOT_DOT_PAT@302..304
|
REST_PAT@302..304
|
||||||
DOT2@302..304 ".."
|
DOT2@302..304 ".."
|
||||||
R_BRACK@304..305 "]"
|
R_BRACK@304..305 "]"
|
||||||
WHITESPACE@305..306 " "
|
WHITESPACE@305..306 " "
|
||||||
|
@ -254,7 +254,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@321..325 "head"
|
IDENT@321..325 "head"
|
||||||
COMMA@325..326 ","
|
COMMA@325..326 ","
|
||||||
WHITESPACE@326..327 " "
|
WHITESPACE@326..327 " "
|
||||||
DOT_DOT_PAT@327..329
|
REST_PAT@327..329
|
||||||
DOT2@327..329 ".."
|
DOT2@327..329 ".."
|
||||||
R_BRACK@329..330 "]"
|
R_BRACK@329..330 "]"
|
||||||
WHITESPACE@330..331 " "
|
WHITESPACE@330..331 " "
|
||||||
|
@ -281,7 +281,7 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@356..357 " "
|
WHITESPACE@356..357 " "
|
||||||
AT@357..358 "@"
|
AT@357..358 "@"
|
||||||
WHITESPACE@358..359 " "
|
WHITESPACE@358..359 " "
|
||||||
DOT_DOT_PAT@359..361
|
REST_PAT@359..361
|
||||||
DOT2@359..361 ".."
|
DOT2@359..361 ".."
|
||||||
R_BRACK@361..362 "]"
|
R_BRACK@361..362 "]"
|
||||||
WHITESPACE@362..363 " "
|
WHITESPACE@362..363 " "
|
||||||
|
@ -302,7 +302,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@378..382 "head"
|
IDENT@378..382 "head"
|
||||||
COMMA@382..383 ","
|
COMMA@382..383 ","
|
||||||
WHITESPACE@383..384 " "
|
WHITESPACE@383..384 " "
|
||||||
DOT_DOT_PAT@384..386
|
REST_PAT@384..386
|
||||||
DOT2@384..386 ".."
|
DOT2@384..386 ".."
|
||||||
COMMA@386..387 ","
|
COMMA@386..387 ","
|
||||||
WHITESPACE@387..388 " "
|
WHITESPACE@387..388 " "
|
||||||
|
@ -334,7 +334,7 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@418..419 " "
|
WHITESPACE@418..419 " "
|
||||||
AT@419..420 "@"
|
AT@419..420 "@"
|
||||||
WHITESPACE@420..421 " "
|
WHITESPACE@420..421 " "
|
||||||
DOT_DOT_PAT@421..423
|
REST_PAT@421..423
|
||||||
DOT2@421..423 ".."
|
DOT2@421..423 ".."
|
||||||
COMMA@423..424 ","
|
COMMA@423..424 ","
|
||||||
WHITESPACE@424..425 " "
|
WHITESPACE@424..425 " "
|
||||||
|
@ -360,11 +360,11 @@ SOURCE_FILE@0..555
|
||||||
IDENT@446..450 "head"
|
IDENT@446..450 "head"
|
||||||
COMMA@450..451 ","
|
COMMA@450..451 ","
|
||||||
WHITESPACE@451..452 " "
|
WHITESPACE@451..452 " "
|
||||||
DOT_DOT_PAT@452..454
|
REST_PAT@452..454
|
||||||
DOT2@452..454 ".."
|
DOT2@452..454 ".."
|
||||||
COMMA@454..455 ","
|
COMMA@454..455 ","
|
||||||
WHITESPACE@455..456 " "
|
WHITESPACE@455..456 " "
|
||||||
DOT_DOT_PAT@456..458
|
REST_PAT@456..458
|
||||||
DOT2@456..458 ".."
|
DOT2@456..458 ".."
|
||||||
COMMA@458..459 ","
|
COMMA@458..459 ","
|
||||||
WHITESPACE@459..460 " "
|
WHITESPACE@459..460 " "
|
||||||
|
@ -390,7 +390,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@481..485 "head"
|
IDENT@481..485 "head"
|
||||||
COMMA@485..486 ","
|
COMMA@485..486 ","
|
||||||
WHITESPACE@486..487 " "
|
WHITESPACE@486..487 " "
|
||||||
DOT_DOT_PAT@487..489
|
REST_PAT@487..489
|
||||||
DOT2@487..489 ".."
|
DOT2@487..489 ".."
|
||||||
COMMA@489..490 ","
|
COMMA@489..490 ","
|
||||||
WHITESPACE@490..491 " "
|
WHITESPACE@490..491 " "
|
||||||
|
@ -405,7 +405,7 @@ SOURCE_FILE@0..555
|
||||||
WHITESPACE@500..501 " "
|
WHITESPACE@500..501 " "
|
||||||
AT@501..502 "@"
|
AT@501..502 "@"
|
||||||
WHITESPACE@502..503 " "
|
WHITESPACE@502..503 " "
|
||||||
DOT_DOT_PAT@503..505
|
REST_PAT@503..505
|
||||||
DOT2@503..505 ".."
|
DOT2@503..505 ".."
|
||||||
R_BRACK@505..506 "]"
|
R_BRACK@505..506 "]"
|
||||||
WHITESPACE@506..507 " "
|
WHITESPACE@506..507 " "
|
||||||
|
@ -426,7 +426,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@522..526 "head"
|
IDENT@522..526 "head"
|
||||||
COMMA@526..527 ","
|
COMMA@526..527 ","
|
||||||
WHITESPACE@527..528 " "
|
WHITESPACE@527..528 " "
|
||||||
DOT_DOT_PAT@528..530
|
REST_PAT@528..530
|
||||||
DOT2@528..530 ".."
|
DOT2@528..530 ".."
|
||||||
COMMA@530..531 ","
|
COMMA@530..531 ","
|
||||||
WHITESPACE@531..532 " "
|
WHITESPACE@531..532 " "
|
||||||
|
@ -435,7 +435,7 @@ SOURCE_FILE@0..555
|
||||||
IDENT@532..535 "mid"
|
IDENT@532..535 "mid"
|
||||||
COMMA@535..536 ","
|
COMMA@535..536 ","
|
||||||
WHITESPACE@536..537 " "
|
WHITESPACE@536..537 " "
|
||||||
DOT_DOT_PAT@537..539
|
REST_PAT@537..539
|
||||||
DOT2@537..539 ".."
|
DOT2@537..539 ".."
|
||||||
COMMA@539..540 ","
|
COMMA@539..540 ","
|
||||||
WHITESPACE@540..541 " "
|
WHITESPACE@540..541 " "
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ SOURCE_FILE@0..3813
|
||||||
PARAM@2952..2962
|
PARAM@2952..2962
|
||||||
TUPLE_PAT@2952..2956
|
TUPLE_PAT@2952..2956
|
||||||
L_PAREN@2952..2953 "("
|
L_PAREN@2952..2953 "("
|
||||||
DOT_DOT_PAT@2953..2955
|
REST_PAT@2953..2955
|
||||||
DOT2@2953..2955 ".."
|
DOT2@2953..2955 ".."
|
||||||
R_PAREN@2955..2956 ")"
|
R_PAREN@2955..2956 ")"
|
||||||
COLON@2956..2957 ":"
|
COLON@2956..2957 ":"
|
||||||
|
|
|
@ -128,7 +128,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
|
||||||
"BOX_PAT",
|
"BOX_PAT",
|
||||||
"IDENT_PAT",
|
"IDENT_PAT",
|
||||||
"WILDCARD_PAT",
|
"WILDCARD_PAT",
|
||||||
"DOT_DOT_PAT",
|
"REST_PAT",
|
||||||
"PATH_PAT",
|
"PATH_PAT",
|
||||||
"RECORD_PAT",
|
"RECORD_PAT",
|
||||||
"RECORD_PAT_FIELD_LIST",
|
"RECORD_PAT_FIELD_LIST",
|
||||||
|
|
|
@ -498,7 +498,7 @@ TypeBound =
|
||||||
Pat =
|
Pat =
|
||||||
IdentPat
|
IdentPat
|
||||||
| BoxPat
|
| BoxPat
|
||||||
| DotDotPat
|
| RestPat
|
||||||
| LiteralPat
|
| LiteralPat
|
||||||
| MacroPat
|
| MacroPat
|
||||||
| OrPat
|
| OrPat
|
||||||
|
@ -560,7 +560,7 @@ OrPat =
|
||||||
BoxPat =
|
BoxPat =
|
||||||
'box' Pat
|
'box' Pat
|
||||||
|
|
||||||
DotDotPat =
|
RestPat =
|
||||||
'..'
|
'..'
|
||||||
|
|
||||||
MacroPat =
|
MacroPat =
|
||||||
|
|
Loading…
Reference in a new issue