Open shevchuk opened 7 years ago
that isn't JS though, its a babel plugin and hopefully never becomes real JS.
I agree it should not be supported officially by js2-mode
but some of us have to deal with already existing code that uses that syntax. Is there any easy hack for at least prevent the syntax highlighting to get broken?
I don't know how we'd do that. The parser here is not made to be especially forgiving.
This (and other @babel features) will become a no-go for adopting js2-mode. There needs to be a mechanism in altering how the parser works.
If somebody wants to try their hand at adding an extensibility framework, please be my guest.
Otherwise, js-mode
is still an option when you have to work with more complex syntaxes, though it's not as feature-rich.
not fully related to this topic but still worth to mention, the js2-mode is also not working if flow types are used in the file. So I think all these may have a common solution with this extensibility framework that Dmitry mentioned
There is a new bind syntax introduced in ES7:
Which currently generates error: