fix: correctly determine is_set for checking targets (#286)

This commit is contained in:
Myriad-Dreamin 2024-05-14 19:29:22 +08:00 committed by GitHub
parent 8cbd32c724
commit 3cd86a06a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -305,7 +305,7 @@ pub fn get_check_target_by_context<'a>(
};
let args = parent.find(args.span())?;
let is_set = parent.kind() == SyntaxKind::Set;
let is_set = parent.kind() == SyntaxKind::SetRule;
let target = get_param_target(args.clone(), node, ParamKind::Call)?;
Some(CheckTarget::Param {
callee,
@ -336,7 +336,7 @@ pub fn get_check_target(node: LinkedNode) -> Option<CheckTarget<'_>> {
};
let args = parent.find(args.span())?;
let is_set = parent.kind() == SyntaxKind::Set;
let is_set = parent.kind() == SyntaxKind::SetRule;
let target = get_param_target(args.clone(), node, ParamKind::Call)?;
return Some(CheckTarget::Param {
callee,