Building C++ modules

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Aug 14 17:16:33 UTC 2019


On Wed, Aug 14, 2019 at 12:40:00PM +0200, Jacob Carlborg via Digitalmars-d wrote:
> On 2019-08-13 17:21, H. S. Teoh wrote:
> > On Tue, Aug 13, 2019 at 11:19:16AM +0200, Jacob Carlborg via Digitalmars-d wrote:
> > > DMD is doing something similar, but at a later stage. For example,
> > > in the following code snippet: "int a = foo;", "foo" is parsed as
> > > an identifier expression. Then the semantic analyzer figures out
> > > if "foo" is a function call or a variable.
> > [...]
> > 
> > There's no such thing as an 'identifier expression'. `foo` is parsed
> > as an expression, period.
> 
> I'm not sure if you're still talking about DMD here, but there's
> definitely an "identifier expression", it's right here [1]. It's
> created in the parser here [2]. Then during the semantic phase it's
> turned into something else.
[...]

Whoa.  OK, I stand corrected.  Didn't know that was how DMD did it!
That's pretty ... weird.  And explains some of the quirkiness around
certain bits of D syntax, like some of the ugly corner cases of `alias`.


T

-- 
It always amuses me that Windows has a Safe Mode during bootup. Does that mean that Windows is normally unsafe?


More information about the Digitalmars-d mailing list