Contextualizing keywords

Ary Borenszweig ary at esperanto.org.ar
Sun Aug 2 21:00:07 PDT 2009


Jarrett Billingsley escribió:
> On Sun, Aug 2, 2009 at 9:30 PM, Walter Bright<newshound1 at digitalmars.com> wrote:
>> Chad J wrote:
>>> This makes things more difficult for syntax highlighters.  A number of
>>> them will just not work correctly because they don't actually parse the
>>> code.
>> That's true. Another thing keywords provide are "anchors" that enable better
>> error recovery.
> 
> I've often wondered about how useful parser recovery really is.  Most
> of the time, parsing errors after the first are complete bull anyway,
> so the compiler's just filling up my console with garbage.  If you
> combine that with the fact that recompiles are extremely cheap with D
> and modern machines, and that D's module organization limits the scope
> of parsing errors to a single file (instead of with C/C++, where a
> parsing error in a header can cascade into a number of following
> headers and the source), I wonder how useful it really is to continue
> to try to parse after the first error.

At least it's useful in an IDE, because it doesn't break your outline, 
autocompletion can still work, etc. So I'm glad DMD's parser has error 
recovery. :-)

What I don't like is that one semantic error leads to five other 
semantic errors, and it's hard to track what the problem really is.



More information about the Digitalmars-d mailing list