by EdiX · 10y ago · 0 comments
You could make an editor that only allows valid programs but that opens up a lot of UI problems, it was tried many times and it never took off in practice.
Trouble with elaborate 'correct' solutions starts when you need another thing. I don't think support in Eclipse for .cjsx or PureScript or whatever is coming soon. I won't wait 10 years till they get it 'right'. I'll use Atom to get the 95% right in few months.
This parser would not be difficult to write; the only "recovery" is in choosing how to react to mismatched token pairs. The simplified problem means heuristics could potentially be used.