diff --git a/README.md b/README.md index 0e0435c..3e5eb93 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ given source files. * "fish operators" (floating point operators) are deprecated. * Left side of a *foreach* or *foreach\_reverse* range expression is larger than the right. * Left side of a slice expression is larger than the right +* Variable, struct, class, union, module, package, and interface names that do not comply with Phobos style guidelines #### Wishlish * Assigning to foreach variables that are not "ref". diff --git a/stdx/d/parser.d b/stdx/d/parser.d index 573cfb5..a27fa52 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -4723,6 +4723,8 @@ q{(int a, ...) do { auto structMemberInitializer = parseStructMemberInitializer(); + if (structMemberInitializer !is null) + node.structMemberInitializers ~= structMemberInitializer; if (currentIs(tok!",")) { advance(); @@ -6103,7 +6105,15 @@ protected: return !peekIs(tok!"switch"); case tok!"debug": case tok!"version": - return !peekIs(tok!"="); + { + if (peekIs(tok!"=")) + return false; + + auto b = setBookmark(); + scope (exit) goToBookmark(b); + advance(); + return isDeclaration(); + } case tok!"synchronized": if (peekIs(tok!"(")) return false;