module Prism::NodeFind

Finds the Prism AST node corresponding to a given Method, UnboundMethod, Proc, or Thread::Backtrace::Location. On CRuby, uses node_id from the instruction sequence for an exact match. On other implementations, falls back to best-effort matching by source location line number.

This module is autoloaded so that programs that donโ€™t use Prism.find donโ€™t pay for its definition.