Skip to content

Commit

Permalink
Call can_cast in cast
Browse files Browse the repository at this point in the history
  • Loading branch information
azdavis committed Oct 21, 2023
1 parent bc4bb79 commit d145572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/syntax-gen/src/seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub(crate) fn get(cx: &Cx, name: Ident, rules: &[Rule]) -> TokenStream {
}

fn cast(node: SyntaxNode) -> Option<Self> {
(node.kind() == SK::#name).then_some(Self(node))
Self::can_cast(node.kind()).then_some(Self(node))
}

fn syntax(&self) -> &SyntaxNode {
Expand Down

0 comments on commit d145572

Please sign in to comment.