Closed romandecker closed 6 years ago
This is not an easy task. js2 and rjsx use a recursive descent parser to understand syntax, and it needs to be manually modified (at the js2 level) to support flow. There's an issue on js2 about this: mooz/js2#224
mooz/js2-mode#224
Is there any way to make rjsx-mode support flowtype-style type annotations in syntax highlighting? Having annotations in there can break highlighting pretty badly (everything from the start of the annotation is highlighted incorrectly).
Example:
Simply ignoring the annotations would suffice as a starting point.