Cormac Relf

Results 226 comments of Cormac Relf

@michalrentka The previous message no longer applies, use the CiteprocRsKit repo directly. I managed to get it working via SwiftPM exclusively, using a precompiled binary for only the Rust parts....

I can probably use those three toy languages to make a test for this behaviour. It seems I could modify the CMake TS fetcher to point to a "vendored" copy...

I can't see a mock surviving much in terms of alternative implementations, unless I mock quite deep. Think moving the clipping to iter_matches, if that e.g. fixes some highlight problems...

I've realised a couple of things that will probably make the interval tree obsolete. It was fun implementing it, but: 1. Tree sitter set_included_ranges API does not allow overlapping ranges...

Ok, tests added as promised. I also did implement the binary searching method as described. It doesn't do any sort/overlap checking because why bother if `ts_parser_set_included_ranges` is going to yell...

Also a little sneak preview before/after clipping ranges in TSHighlighter as well:

@justinmk I changed the impl to a binary search and deleted the interval tree, should have updated the top comment, but generally yes I think we should make the clipping...

Ok, extranges maybe another time. For now it can clip one range that intersects only a couple of parent ranges in about 600ns when parent_ranges is small. `O(log2(n))` search is...

> I don't doubt for one moment that nom can do everything regex can do Without diving into the academic way of looking at this statement, I don't think there...

Not sure if replying to me, but to clarify, this doesn't exist (yet), so I just wrote it myself: ```rust // `take_till_match!(alt!(tag!("John") | tag!("Amanda")))` // Running that on `"Hello, Amanda"`...