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
Some cases where these modes currently fail require human review, e.g. when they highlight something in one way but another way is expected. But in a lot of cases I've been seeing, the highlighting just breaks for a while and then starts working again later. This leaves even keywords like void totally unhighlighted. For these modes to be considered fully working, I believe this kind of condition should not occur (at least in "reasonable" code, but ideally in all properly compiling code). But currently I don't get any exceptions or log messages in the console when this happens.
It'd be a lot easier for me to report this type of bug to you if I could just run the CodeMirror mode parser over some existing code and have it report when it got into an unparseable situation. The manual way would be to have this in some web browser window, automatic would be if I could run a small node app that just reads a set of file paths/glob/list of directories/whatever., and it would print out some error messages when it runs into this case.
Does that sound like something feasible? Or does it already exist somewhere and I just haven't looked in the right places?
The text was updated successfully, but these errors were encountered:
If you set verbose to 1 in mode.js in the grammar-mode package, that'll output something to the console when the matcher's error-recovery kicks in, but that will also happen for cases where the recovery actually works well, so it's probably not what you're looking for. In general the grammars simply don't aim to be 100% complete, at least not for nightmare grammars like C++'s, where an approximation that works well in practice is really all I dare to aim for.
So I can't really think of a clean way to automatically detect this, except by using heuristics for obviously wrong output or indentation.
Some cases where these modes currently fail require human review, e.g. when they highlight something in one way but another way is expected. But in a lot of cases I've been seeing, the highlighting just breaks for a while and then starts working again later. This leaves even keywords like
void
totally unhighlighted. For these modes to be considered fully working, I believe this kind of condition should not occur (at least in "reasonable" code, but ideally in all properly compiling code). But currently I don't get any exceptions or log messages in the console when this happens.It'd be a lot easier for me to report this type of bug to you if I could just run the CodeMirror mode parser over some existing code and have it report when it got into an unparseable situation. The manual way would be to have this in some web browser window, automatic would be if I could run a small node app that just reads a set of file paths/glob/list of directories/whatever., and it would print out some error messages when it runs into this case.
Does that sound like something feasible? Or does it already exist somewhere and I just haven't looked in the right places?
The text was updated successfully, but these errors were encountered: