You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Activity
jackfirth commentedon Nov 12, 2025
Proposed API: add a
source-syntax-pathsfunction that accepts asource?and an optionalrange-set?of line numbers, and returns an immutablesorted-set?ofsyntax-path?values. Any syntax objects which partially overlap with the line range should have their paths included. Thesource-analyzefunction should be changed to accept a sorted set ofsyntax-path?values instead of a range set of line numbers.