Skip to content

Filtering by syntax paths #752

Open
Open

Description

@jackfirth

Resyntax can be asked to only make suggestions on specific lines and line ranges, as opposed to whole files. There are various places in Resyntax's core engine where this is used to filter out syntax objects based on whether their source location lies within the requested lines.

However, as more and more of Resyntax has changed to work in terms of syntax paths instead of source locations, this implementation is getting in the way. There should be a utility that takes a syntax object and a set of line ranges and returns a sorted set of the syntax paths within that syntax object that overlap with the line ranges. This would make it possible to ask expansion analyzers to only concern themselves with certain parts of the expanded syntax, instead of the entire expansion.

Activity

  1. added
    autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot run
    on Nov 12, 2025
  2. jackfirth commented on Nov 12, 2025

    @jackfirth
    OwnerAuthor

    Proposed API: add a source-syntax-paths function that accepts a source? and an optional range-set? of line numbers, and returns an immutable sorted-set? of syntax-path? values. Any syntax objects which partially overlap with the line range should have their paths included. The source-analyze function should be changed to accept a sorted set of syntax-path? values instead of a range set of line numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot run

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions