"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dmd/parse.d" between
dmd-2.093.0.tar.gz and dmd-2.093.1.tar.gz

About: DMD (Digital Mars D) is the D reference compiler. D is an object-oriented, imperative, multi-paradigm system programming language.

parse.d  (dmd-2.093.0):parse.d  (dmd-2.093.1)
skipping to change at line 3225 skipping to change at line 3225
nextToken(); nextToken();
} }
} }
else else
{ {
value = null; value = null;
if (type && type != AST.Type.terror && isAnonymousEnum) if (type && type != AST.Type.terror && isAnonymousEnum)
error("if type, there must be an initializer"); error("if type, there must be an initializer");
} }
AST.UserAttributeDeclaration uad;
if (udas)
uad = new AST.UserAttributeDeclaration(udas, null);
AST.DeprecatedDeclaration dd; AST.DeprecatedDeclaration dd;
if (deprecationMessage) if (deprecationMessage)
{ {
dd = new AST.DeprecatedDeclaration(deprecationMessage, null) ; dd = new AST.DeprecatedDeclaration(deprecationMessage, null) ;
stc |= STC.deprecated_; stc |= STC.deprecated_;
} }
auto em = new AST.EnumMember(loc, ident, value, type, stc, uad, dd); auto em = new AST.EnumMember(loc, ident, value, type, stc, null, dd);
e.members.push(em); e.members.push(em);
if (udas)
{
auto s = new AST.Dsymbols();
s.push(em);
auto uad = new AST.UserAttributeDeclaration(udas, s);
em.userAttribDecl = uad;
}
if (token.value == TOK.rightCurly) if (token.value == TOK.rightCurly)
{ {
} }
else else
{ {
addComment(em, comment); addComment(em, comment);
comment = null; comment = null;
check(TOK.comma); check(TOK.comma);
} }
addComment(em, comment); addComment(em, comment);
skipping to change at line 3984 skipping to change at line 3988
//printf("it's an associative array\n"); //printf("it's an associative array\n");
AST.Type index = parseType(); // [ type ] AST.Type index = parseType(); // [ type ]
t = new AST.TypeAArray(t, index); t = new AST.TypeAArray(t, index);
check(TOK.rightBracket); check(TOK.rightBracket);
} }
else else
{ {
//printf("it's type[expression]\n"); //printf("it's type[expression]\n");
inBrackets++; inBrackets++;
AST.Expression e = parseAssignExp(); // [ expression ] AST.Expression e = parseAssignExp(); // [ expression ]
if (!e)
{
inBrackets--;
check(TOK.rightBracket);
continue;
}
if (token.value == TOK.slice) if (token.value == TOK.slice)
{ {
nextToken(); nextToken();
AST.Expression e2 = parseAssignExp(); // [ exp .. exp ] AST.Expression e2 = parseAssignExp(); // [ exp .. exp ]
t = new AST.TypeSlice(t, e, e2); t = new AST.TypeSlice(t, e, e2);
} }
else else
{ {
t = new AST.TypeSArray(t, e); t = new AST.TypeSArray(t, e);
} }
 End of changes. 4 change blocks. 
5 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)