Reach.IR.Helpers (Reach v2.8.1)

Copy Markdown View Source

Utility functions for IR node inspection and traversal.

Summary

Functions

call_name(node)

clause_labels(func_def)

direct_parent_index(nodes)

@spec direct_parent_index(%{optional(term()) => Reach.IR.Node.t()}) :: %{
  optional(term()) => Reach.IR.Node.t()
}

Builds a child-node id to direct-parent index.

func_id_to_string(other)

function_pattern?(node, function_index, parents)

@spec function_pattern?(Reach.IR.Node.t(), map(), map()) :: boolean()

Returns whether a node belongs to a function-clause pattern.

location(node)

mark_as_definitions(node)

module_from_path(path)

param_var_name(arg1)

var_used_in_subtree?(node, target)