So... let's document dmd

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 5 04:34:07 PDT 2016


On 2016-01-16 16:13, H. S. Teoh via Digitalmars-d wrote:

> I disagree. I think having the dmd itself (lexer, parser, etc.) as a
> library (with the dmd executable merely being the default frontend) will
> do D a lot of good.
>
> For one thing, IDE's will no longer need to reinvent a D parser for the
> purposes of syntax highlighting; they can reuse the actual parser the
> compiler itself uses, and thus actually be correct (whereas their own
> parser may actually only parse a subset of D correctly).  They will also
> be able to support instant feedback as the user types in D code
> (highlight syntax errors on the fly, etc.).

I agree very much with this. Unfortunately many (most?) editors use 
their own weird syntax to describe grammars for syntax highlighting and 
cannot use a proper lexer/parser.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list