Showing with 33 additions and 25 deletions.
  1. +14 −14 src/expression.d
  2. +8 −1 src/hdrgen.d
  3. +3 −3 src/mtype.d
  4. +2 −2 src/parse.d
  5. +5 −4 src/tokens.d
  6. +1 −1 src/tokens.h
28 changes: 14 additions & 14 deletions src/expression.d
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ extern (C++) Expression resolvePropertiesX(Scope* sc, Expression e1, Expression
Dsymbol s;
Objects* tiargs;
Type tthis;
if (e1.op == TOKdotexp)
if (e1.op == TOKdot)
{
DotExp de = cast(DotExp)e1;
if (de.e2.op == TOKoverloadset)
Expand Down Expand Up @@ -474,7 +474,7 @@ extern (C++) Expression resolvePropertiesX(Scope* sc, Expression e1, Expression
}
}
}
else if (e1.op == TOKdotexp)
else if (e1.op == TOKdot)
{
e1.error("expression has no value");
return new ErrorExp();
Expand Down Expand Up @@ -546,7 +546,7 @@ extern (C++) Expression resolvePropertiesOnly(Scope* sc, Expression e1)
OverloadSet os;
FuncDeclaration fd;
TemplateDeclaration td;
if (e1.op == TOKdotexp)
if (e1.op == TOKdot)
{
DotExp de = cast(DotExp)e1;
if (de.e2.op == TOKoverloadset)
Expand Down Expand Up @@ -708,7 +708,7 @@ extern (C++) Expression resolveUFCS(Scope* sc, CallExp ce)
Loc loc = ce.loc;
Expression eleft;
Expression e;
if (ce.e1.op == TOKdot)
if (ce.e1.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)ce.e1;
Identifier ident = die.ident;
Expand Down Expand Up @@ -804,7 +804,7 @@ extern (C++) Expression resolveUFCSProperties(Scope* sc, Expression e1, Expressi
Loc loc = e1.loc;
Expression eleft;
Expression e;
if (e1.op == TOKdot)
if (e1.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)e1;
eleft = die.e1;
Expand Down Expand Up @@ -7821,7 +7821,7 @@ public:

extern (D) this(Loc loc, Expression e, Identifier ident)
{
super(loc, TOKdot, __traits(classInstanceSize, DotIdExp), e);
super(loc, TOKdotid, __traits(classInstanceSize, DotIdExp), e);
this.ident = ident;
}

Expand Down Expand Up @@ -7913,7 +7913,7 @@ public:
// bypass checkPurity
return e1.type.dotExp(sc, e1, ident, 0);
}
if (e1.op == TOKdotexp)
if (e1.op == TOKdot)
{
}
else
Expand Down Expand Up @@ -7991,7 +7991,7 @@ public:
return e;
Expression eleft;
Expression eright;
if (e1.op == TOKdotexp)
if (e1.op == TOKdot)
{
DotExp de = cast(DotExp)e1;
eleft = de.e1;
Expand Down Expand Up @@ -8447,7 +8447,7 @@ public:
return true;
Expression e = new DotIdExp(loc, e1, ti.name);
e = e.semantic(sc);
if (e.op == TOKdotexp)
if (e.op == TOKdot)
e = (cast(DotExp)e).e2;
Dsymbol s = null;
switch (e.op)
Expand Down Expand Up @@ -8625,7 +8625,7 @@ public:
e = e.semantic(sc);
return e;
}
else if (e.op == TOKdotexp)
else if (e.op == TOKdot)
{
DotExp de = cast(DotExp)e;
e1 = de.e1; // pull semantic() result
Expand Down Expand Up @@ -8986,7 +8986,7 @@ public:
}
else
{
if (e1.op == TOKdot)
if (e1.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)e1;
e1 = die.semantic(sc);
Expand Down Expand Up @@ -9044,7 +9044,7 @@ public:
e1 = new VarExp(se.loc, se.var, 1);
e1 = e1.semantic(sc);
}
else if (e1.op == TOKdotexp)
else if (e1.op == TOKdot)
{
DotExp de = cast(DotExp)e1;
if (de.e2.op == TOKoverloadset)
Expand Down Expand Up @@ -10950,7 +10950,7 @@ extern (C++) final class DotExp : BinExp
public:
extern (D) this(Loc loc, Expression e1, Expression e2)
{
super(loc, TOKdotexp, __traits(classInstanceSize, DotExp), e1, e2);
super(loc, TOKdot, __traits(classInstanceSize, DotExp), e1, e2);
}

override Expression semantic(Scope* sc)
Expand Down Expand Up @@ -11737,7 +11737,7 @@ public:
return resolveUFCSProperties(sc, e1x, e2);
e1x = e;
}
else if (e1x.op == TOKdot)
else if (e1x.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)e1x;
Expression e = die.semanticY(sc, 1);
Expand Down
9 changes: 8 additions & 1 deletion src/hdrgen.d
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,14 @@ public:
while (t)
{
buf.writestring(t.toChars());
if (t.next && t.value != TOKmin && t.value != TOKcomma && t.next.value != TOKcomma && t.value != TOKlbracket && t.next.value != TOKlbracket && t.next.value != TOKrbracket && t.value != TOKlparen && t.next.value != TOKlparen && t.next.value != TOKrparen && t.value != TOKdot && t.next.value != TOKdot)
if (t.next &&
t.value != TOKmin &&
t.value != TOKcomma && t.next.value != TOKcomma &&
t.value != TOKlbracket && t.next.value != TOKlbracket &&
t.next.value != TOKrbracket &&
t.value != TOKlparen && t.next.value != TOKlparen &&
t.next.value != TOKrparen &&
t.value != TOKdot && t.next.value != TOKdot)
{
buf.writeByte(' ');
}
Expand Down
6 changes: 3 additions & 3 deletions src/mtype.d
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,7 @@ public:
//case TOKdottd:
//case TOKdotti:
//case TOKdottype:
//case TOKdot:
//case TOKdotid:

default:
*pe = e;
Expand Down Expand Up @@ -7830,7 +7830,7 @@ public:
sc2.pop();
return e;
}
if (e.op == TOKdotexp)
if (e.op == TOKdot)
{
DotExp de = cast(DotExp)e;
if (de.e1.op == TOKscope)
Expand Down Expand Up @@ -8540,7 +8540,7 @@ public:
{
printf("TypeClass::dotExp(e='%s', ident='%s')\n", e.toChars(), ident.toChars());
}
if (e.op == TOKdotexp)
if (e.op == TOKdot)
{
DotExp de = cast(DotExp)e;
if (de.e1.op == TOKscope)
Expand Down
4 changes: 2 additions & 2 deletions src/parse.d
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ __gshared PREC[TOKMAX] precedence =
TOKvoid : PREC_primary,
// post
TOKdotti : PREC_primary,
TOKdot : PREC_primary,
TOKdotid : PREC_primary,
TOKdottd : PREC_primary,
TOKdotexp : PREC_primary,
TOKdot : PREC_primary,
TOKdottype : PREC_primary,
TOKplusplus : PREC_primary,
TOKminusminus : PREC_primary,
Expand Down
9 changes: 5 additions & 4 deletions src/tokens.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ enum TOK : int
TOKsymoff,
TOKvar,
TOKdotvar,
TOKdotid,
TOKdotti,
TOKdotexp,
TOKdottype,
TOKslice,
TOKarraylength,
Expand Down Expand Up @@ -329,8 +329,8 @@ alias TOKstar = TOK.TOKstar;
alias TOKsymoff = TOK.TOKsymoff;
alias TOKvar = TOK.TOKvar;
alias TOKdotvar = TOK.TOKdotvar;
alias TOKdotid = TOK.TOKdotid;
alias TOKdotti = TOK.TOKdotti;
alias TOKdotexp = TOK.TOKdotexp;
alias TOKdottype = TOK.TOKdottype;
alias TOKslice = TOK.TOKslice;
alias TOKarraylength = TOK.TOKarraylength;
Expand Down Expand Up @@ -677,9 +677,11 @@ extern (C++) struct Token
Token.tochars[TOKpowass] = "^^=";
Token.tochars[TOKgoesto] = "=>";
Token.tochars[TOKpound] = "#";

// For debugging
Token.tochars[TOKerror] = "error";
Token.tochars[TOKdotexp] = "dotexp";
Token.tochars[TOKdotid] = "dotid";
Token.tochars[TOKdottd] = "dottd";
Token.tochars[TOKdotti] = "dotti";
Token.tochars[TOKdotvar] = "dotvar";
Token.tochars[TOKdottype] = "dottype";
Expand All @@ -692,7 +694,6 @@ extern (C++) struct Token
Token.tochars[TOKdsymbol] = "symbol";
Token.tochars[TOKtuple] = "tuple";
Token.tochars[TOKdeclaration] = "declaration";
Token.tochars[TOKdottd] = "dottd";
Token.tochars[TOKon_scope_exit] = "scope(exit)";
Token.tochars[TOKon_scope_success] = "scope(success)";
Token.tochars[TOKon_scope_failure] = "scope(failure)";
Expand Down
2 changes: 1 addition & 1 deletion src/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum TOK
TOKnew, TOKdelete,
TOKstar, TOKsymoff,
TOKvar, TOKdotvar,
TOKdotti, TOKdotexp,
TOKdotid, TOKdotti,
TOKdottype, TOKslice,
TOKarraylength, TOKversion,
TOKmodule, TOKdollar,
Expand Down