• Collects mutations local or state mutations within the statements.

    Parameters

    • stmt: AstStatement
    • flatStmts: Partial<{
          flatStmts: boolean;
      }> = {}

      If true, only traverse statements at the current level without going into nested statements. It should be used when calling this function inside one of the iterators.

    Returns {
        mutatedFields: MutatedElement[];
        mutatedLocals: MutatedElement[];
    } | undefined

    Mutated fields and local identifiers, including nested fields of mutated structure instances