Yes, that sounds about right. Keep in mind that the ParseResult interface already provides methods to return the re-parsed range, but by line number as opposed to offset. I'm not sure if that's an OK approach (or sufficient) or not. The idea was that the ParserManager tells the Parser what changed, but the Parser is free to re-parse just that or some other range (likely, all lines >= the first modified line, or the entire document).

If you work on this, and submit a pull request, I'd prefer it on a non-master branch if possible. Patches are also OK.

Yes, that sounds about right. Keep in mind that the ParseResult interface already provides methods to return the re-parsed range, but by line number as opposed to offset. I'm not sure if that's an OK approach (or sufficient) or not. The idea was that the ParserManager tells the Parser what changed, but the Parser is free to re-parse just that or some other range (likely, all lines >= the first modified line, or the entire document).

If you work on this, and submit a pull request, I'd prefer it on a non-master branch if possible. Patches are also OK.

Any plans to implement this feature? I can try to give it a go with something like this:1) a new interface would identify parsers that are capable of accepting firstOffsetModded/lastOffsetModded in the parse method2) ParserManager will check each registered parser for being an instance of the interface, cast and call an alternative parser method with block start/end positions3) ParseResult is extended to define the area that was re-parsed4) removeParserNotices(..) is made sensetive to the affected area as described in the passed ParseResult

Am I missing anything? Is this a sensible approach?

Best regards

Any plans to implement this feature? I can try to give it a go with something like this:1) a new interface would identify parsers that are capable of accepting firstOffsetModded/lastOffsetModded in the parse method2) ParserManager will check each registered parser for being an instance of the interface, cast and call an alternative parser method with block start/end positions3) ParseResult is extended to define the area that was re-parsed4) removeParserNotices(..) is made sensetive to the affected area as described in the passed ParseResult

Yes, the parsing of the modified region is a feature that wasn't quite completed. I started working on this but never finished it. To implement this, in addition to passing firstOffsetModded/lastOffsetModded to parsers (or perhaps their line indexes, not sure which would be better), you'll need to modify the removeParserNotices(ParseResult) method to only remove noticed in the re-parsed line region.

Pull requests are welcome! ParserManager is private only because applications shouldn't have to modify *how* parsing is done; they should only have to install a Parser and wait for callbacks.

Yes, the parsing of the modified region is a feature that wasn't quite completed. I started working on this but never finished it. To implement this, in addition to passing firstOffsetModded/lastOffsetModded to parsers (or perhaps their line indexes, not sure which would be better), you'll need to modify the removeParserNotices(ParseResult) method to only remove noticed in the re-parsed line region.

Pull requests are welcome! ParserManager is private only because applications shouldn't have to modify *how* parsing is done; they should only have to install a Parser and wait for callbacks.

I am trying to figure out how to improve parsing performance for large files (> 1000 lines). Reparsing whole document does not seem right and my parser does support multiple syntactic elements as entry points. The ParseManager does track the dirty area which is exactly what I need to get started. However the relevant fields (firstOffsetModded, lastOffsetModded) are not passed on to a parser and are not accessible (only used for debug?). ParserManager itself is not public and there is no way it seems to provide a custom manager.

Is there any reason why ParseManager is not replaceable and why its fields firstOffsetModded, lastOffsetModded are private? They way things appear to me is that ParserManager is not finished?

I am trying to figure out how to improve parsing performance for large files (> 1000 lines). Reparsing whole document does not seem right and my parser does support multiple syntactic elements as entry points. The ParseManager does track the dirty area which is exactly what I need to get started. However the relevant fields (firstOffsetModded, lastOffsetModded) are not passed on to a parser and are not accessible (only used for debug?). ParserManager itself is not public and there is no way it seems to provide a custom manager.

Is there any reason why ParseManager is not replaceable and why its fields firstOffsetModded, lastOffsetModded are private? They way things appear to me is that ParserManager is not finished?