mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
update some logic and comments
This commit is contained in:
parent
b29e612a4d
commit
0308e02ba9
3 changed files with 8 additions and 3 deletions
|
@ -1089,7 +1089,12 @@ fn expr_contains_symbol(expr: &Expr, needle: Symbol) -> bool {
|
|||
match expr {
|
||||
Expr::Literal(_) => false,
|
||||
Expr::Call(call) => call.arguments.contains(&needle),
|
||||
Expr::Tag { arguments, .. } => arguments.contains(&needle),
|
||||
Expr::Tag {
|
||||
arguments, reuse, ..
|
||||
} => match reuse {
|
||||
None => arguments.contains(&needle),
|
||||
Some(ru) => ru.symbol == needle || arguments.contains(&needle),
|
||||
},
|
||||
Expr::Struct(fields) => fields.contains(&needle),
|
||||
Expr::NullPointer => false,
|
||||
Expr::StructAtIndex { structure, .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue