pub fn immediate_scope_accesses<'a>(
expr: &'a Expression,
scope: &'a StructFields,
) -> FieldAccesses<'a>Expand description
For all subexpressions in an expression, find the fields that are accessed directly from the scope, but not any fields in those fields e.g. scope = {a: {b: .., c: ..}, d: ..}, expr = root().a.b + root().d accesses {a,d} (not b).
Note: This is a very naive, but simple analysis to find the fields that are accessed directly on an identity node. This is combined to provide an over-approximation of the fields that are accessed by an expression.