mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
We have a strange workaround for `visit_function` where we pass in `ScopeFlags`, to support creating the scope inside `Function`, but setting different flags for `MethodDefinition`s. Previously `visit_function` took `Option<ScopeFlags>` and then did `flags.unwrap_or(ScopeFlags::empty()) | ScopeFlags::Function` to it. Personally, I found this confusing. When I was looking at `MethodDefinition`, I was wondering "It's a function, why doesn't it set Function flag too?" This changes makes it more explicit and clear what `ScopeFlags` everything has. |
||
|---|---|---|
| .. | ||
| multi-thread.rs | ||
| parser.rs | ||
| visitor.rs | ||