| |
| Posted by deadalnix in reply to Bastiaan Veelo | PermalinkReply |
|
deadalnix
Posted in reply to Bastiaan Veelo
| On Wednesday, 18 May 2022 at 22:00:26 UTC, Bastiaan Veelo wrote:
> On Tuesday, 17 May 2022 at 21:05:08 UTC, deadalnix wrote:
> I use sublime text, which has decent support for D. At least as long as you don't use throw expressions.
There is your problem. Sublime Text likes to be different.
According to the devs, Sublime has its own regex engine optimised for speed, and uses custom grammars for syntax highlighting. Whenever D evolves, someone needs to patch their grammar up; and it’s not the Sublime devs. I did that when the new contract format went live. I told the devs that it would be better for D to have a syntax highlighter based on one of the maintained parsers, but they replied that that would likely never be supported. That’s when I stopped using Sublime for D.
I’m currently using Visual Studio Community (not “Code”) which uses dmd as a library for the parsing.
— Bastiaan
It's not a problem, it is how it's done. Pretty no tooling today that is geared toward text edition uses the language's reference parser, because they need something that recover gracefully on invalid syntax rather than giving you an error.
The parser you need for the compiler != the parser you need for you editor, code formater, etc...
Consider this, clang and clang-format use different parsers.
|