2 ms·
The issue tracker for js2-mode illustrates that such a parsing approach is no guarantee of real-world accuracy either. https://github.com/mooz/js2-mode/issues
by mbrock 11y ago
The issue tracker for js2-mode illustrates that such a parsing approach is no guarantee of real-world accuracy either.
https://github.com/mooz/js2-mode/issues https://github.com/mooz/js2-mode/issues
The goal just shifts from having a semi-accurate regexp tokenizer, to having the language mode's complex parser match the complex parser of the language it targets—which will pretty much never happen, unless the language is exquisitely simple, like maybe restricted dialects of Scheme... or Brainfuck.
- hvis 11y agojs2-mode supports ES6 fairly accurately. But of course, that's not enough, people keep asking for new things: JavaScript mixed with HTML, Facebook Flow support, JSX, new ES7 (still unstable) syntax extensions, and so on. It would be easier with a more stable language. I.e. not JavaScript, which is still going through growing pains. Even so, "25 Open, 204 Closed" seems pretty good to me.
- mbrock 11y agofundamental-mode hasn't failed me even once, is what I mean. :) I'm not criticizing js2-mode, it's just that I have personally given up hope for accurate language modes in general, and realized that they are a lot of effort and IMO relatively little use.