resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

Filtering by syntax paths

Open jackfirth opened this issue 3 months ago • 1 comments

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.

jackfirth avatar Nov 11 '25 19:11 jackfirth