This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

NamePathResolver Pennington.TreeSitter.Resolution

Resolves a dotted member path to a declaration node via a generic, config-driven tree descent.

Methods

Resolve

#
public Node Resolve(Node root, IReadOnlyList<string> segments, LanguageDeclarationConfig config)

Resolves segments (e.g. ["Calculator", "add"]) to a declaration node under root, or null if no path matches. Each segment must name a declaration nested (through transparent wrapper nodes) within a node matched by the previous segment.

Parameters

root Node
segments IReadOnlyList<string>
config LanguageDeclarationConfig

Returns

Node

Pennington.TreeSitter.Resolution.NamePathResolver

namespace Pennington.TreeSitter.Resolution;

/// Resolves a dotted member path to a declaration node via a generic, config-driven tree descent.
public class NamePathResolver
{
    /// Resolves segments (e.g. ["Calculator", "add"]) to a declaration node under root, or null if no path matches. Each segment must name a declaration nested (through transparent wrapper nodes) within a node matched by the previous segment.
    
public Node Resolve(Node root, IReadOnlyList<string> segments, LanguageDeclarationConfig config)
; }