summaryrefslogtreecommitdiff
path: root/src/syntax/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/ast.rs')
-rw-r--r--src/syntax/ast.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs
index 4119802e..e492297a 100644
--- a/src/syntax/ast.rs
+++ b/src/syntax/ast.rs
@@ -1570,7 +1570,7 @@ pub enum Param {
/// A named parameter with a default value: `draw: false`.
Named(Named),
/// An argument sink: `..args`.
- Sink(Ident),
+ Sink(Option<Ident>),
}
impl AstNode for Param {
@@ -1578,7 +1578,7 @@ impl AstNode for Param {
match node.kind() {
SyntaxKind::Ident => node.cast().map(Self::Pos),
SyntaxKind::Named => node.cast().map(Self::Named),
- SyntaxKind::Spread => node.cast_first_match().map(Self::Sink),
+ SyntaxKind::Spread => Some(Self::Sink(node.cast_first_match())),
_ => Option::None,
}
}
@@ -1587,7 +1587,7 @@ impl AstNode for Param {
match self {
Self::Pos(v) => v.as_untyped(),
Self::Named(v) => v.as_untyped(),
- Self::Sink(v) => v.as_untyped(),
+ Self::Sink(_) => self.as_untyped(),
}
}
}