//! Scope chain traversal helpers — `scope_chain(arena, start)` returns the
//! ordered chain of enclosing scopes from innermost to outermost.
use ;
/// Returns the chain of enclosing scopes in innermost-first order.
///
/// The chain terminates at the outermost arena-addressable scope; it does
/// **not** include a pseudo "file scope" entry because files are not scopes.
/// Callers that want the containing file read `scope(outermost).file`.
///
/// Returns an empty `Vec` if `start` is `ScopeId::INVALID` or if `start`
/// does not exist in the arena.