So... let's document dmd

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 5 14:37:09 PDT 2016


On 4/5/2016 6:47 AM, Basile B. wrote:
> Also lexing number doesn't need to be as accurate as the
> front-end of the compiler (especially if the HL doesnt have a token type for the
> illegal "lexem".

That is an interesting design point. If I was doing a highlighter, I'd highlight 
in red tokens that the compiler would reject, meaning I'd do the accurate number 
lexing.

Lexing numbers correctly is not trivial, but since the compiler lexer's 
implementation can be cut/pasted, it is trivial in practice.


More information about the Digitalmars-d mailing list